Some fixes (ChangePasswordCustomSql Plugin)

This commit is contained in:
RainLoop Team 2017-03-18 23:52:01 +03:00
parent c0aa67dc52
commit cbc1aa2f4c
6 changed files with 35 additions and 50 deletions

View file

@ -125,8 +125,7 @@ class ChangePasswordCustomSqlDriver implements \RainLoop\Providers\ChangePasswor
*/
public function PasswordChangePossibility($oAccount)
{
return $oAccount && $oAccount->Email() &&
\RainLoop\Plugins\Helper::ValidateWildcardValues($oAccount->Email(), $this->sAllowedEmails);
return $oAccount && $oAccount->Email();
}
/**
@ -170,15 +169,6 @@ class ChangePasswordCustomSqlDriver implements \RainLoop\Providers\ChangePasswor
$update = $conn->prepare($this->mSql);
$mSqlReturn = $update->execute(array());
/* $mSqlReturn = $update->execute(array(
':email' => $sEmail,
':oldpass' => $sPrevPassword,
':newpass' => $sNewPassword,
':domain' => $sEmailDomain,
':username' => $sEmailUser,
':table' => $this->mTable
));
*/
if ($mSqlReturn == true)
{
$bResult = true;
@ -195,7 +185,6 @@ class ChangePasswordCustomSqlDriver implements \RainLoop\Providers\ChangePasswor
$this->oLogger->Write('Something went wrong. Either current password is incorrect, or new password does not match criteria.');
}
}
}
catch (\Exception $oException)
{

View file

@ -5,6 +5,6 @@ This plugin adds change password capability to Rainloop webmail by write your ow
##### Installation is simple:
1. Drop the change-password-customsql in the plugins directory (eg. _RainLoopDir_/data/data_xxxxx/_default/plugins/*)
2. In rainloop admin panel go to Plugins, and activate change-password-customsql.
1. Drop the change-password-custom-sql in the plugins directory (eg. _RainLoopDir_/data/data_xxxxx/_default/plugins/*)
2. In rainloop admin panel go to Plugins, and activate change-password-custom-sql.
3. Enter mysql details on the plugin config screen.

View file

@ -16,11 +16,8 @@ class ChangePasswordCustomSqlPlugin extends \RainLoop\Plugins\AbstractPlugin
switch ($sName)
{
case 'change-password':
include_once __DIR__.'/ChangePasswordCustomSqlDriver.php';
$oProvider = new ChangePasswordCustomSqlDriver();
$oProvider
->SetLogger($this->Manager()->Actions()->Logger())
->SetmHost($this->Config()->Get('plugin', 'mHost', ''))
@ -30,7 +27,6 @@ class ChangePasswordCustomSqlPlugin extends \RainLoop\Plugins\AbstractPlugin
->SetmTable($this->Config()->Get('plugin', 'mTable', ''))
->SetmSql($this->Config()->Get('plugin', 'mSql', ''))
;
break;
}
}