Code Duplication    Length = 13-13 lines in 2 locations

plugins/ispmail-change-password/ChangePasswordISPmailDriver.php 1 location

@@ 224-236 (lines=13) @@
221
				$oPdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
222
223
				$sUpdatePassword = $this->cryptPassword($sNewPassword, $oPdo);
224
				if (0 < \strlen($sUpdatePassword))
225
				{
226
					$oStmt = $oPdo->prepare("UPDATE {$this->sTable} SET {$this->sPasscol} = ? WHERE {$this->sUsercol} = ?");
227
					$bResult = (bool) $oStmt->execute(array($sUpdatePassword, $oAccount->Email()));
228
				}
229
				else
230
				{
231
					if ($this->oLogger)
232
					{
233
						$this->oLogger->Write('ISPmail: Encrypted password is empty',
234
							\MailSo\Log\Enumerations\Type::ERROR);
235
					}
236
				}
237
238
				$oPdo = null;
239
			}

plugins/postfixadmin-change-password/ChangePasswordPostfixAdminDriver.php 1 location

@@ 252-264 (lines=13) @@
249
				$oPdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
250
251
				$sUpdatePassword = $this->cryptPassword($sNewPassword, $oPdo);
252
				if (0 < \strlen($sUpdatePassword))
253
				{
254
					$oStmt = $oPdo->prepare("UPDATE {$this->sTable} SET {$this->sPasscol} = ? WHERE {$this->sUsercol} = ?");
255
					$bResult = (bool) $oStmt->execute(array($sUpdatePassword, $oAccount->Email()));
256
				}
257
				else
258
				{
259
					if ($this->oLogger)
260
					{
261
						$this->oLogger->Write('Postfix: Encrypted password is empty',
262
							\MailSo\Log\Enumerations\Type::ERROR);
263
					}
264
				}
265
266
				$oPdo = null;
267
			}