Added Exception when trying to use mysql-crypt in PostgreSQL

This commit is contained in:
Michel Wohlert 2017-12-01 23:28:32 +01:00
parent 09cdc285ab
commit 9336b5bcb7

View file

@ -317,6 +317,7 @@ class ChangePasswordPostfixAdminDriver implements \RainLoop\Providers\ChangePass
break;
case 'mysql_encrypt':
if($this->sEngine == 'MySQL'){
$oStmt = $oPdo->prepare('SELECT ENCRYPT(?) AS encpass');
if ($oStmt->execute(array($sPassword)))
{
@ -326,6 +327,9 @@ class ChangePasswordPostfixAdminDriver implements \RainLoop\Providers\ChangePass
$sResult = $aFetchResult[0]['encpass'];
}
}
}else{
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CouldNotSaveNewPassword);
}
break;
}