mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 01:17:04 +03:00
Some fixes (ChangePasswordCustomSql Plugin)
This commit is contained in:
parent
c0aa67dc52
commit
cbc1aa2f4c
6 changed files with 35 additions and 50 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
@ -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.
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue