mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Bugfix: Undefined variable oAccount
https://github.com/the-djmaze/snappymail/issues/51#issuecomment-790419644
This commit is contained in:
parent
ab3313faf6
commit
72988972a7
1 changed files with 3 additions and 3 deletions
|
|
@ -97,6 +97,9 @@ class ChangePasswordPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
|
|
||||||
public function ChangePassword()
|
public function ChangePassword()
|
||||||
{
|
{
|
||||||
|
$oActions = $this->Manager()->Actions();
|
||||||
|
$oAccount = $oActions->GetAccount();
|
||||||
|
|
||||||
if (!$oAccount->Email()) {
|
if (!$oAccount->Email()) {
|
||||||
throw new ClientException(static::CouldNotSaveNewPassword);
|
throw new ClientException(static::CouldNotSaveNewPassword);
|
||||||
}
|
}
|
||||||
|
|
@ -104,9 +107,6 @@ class ChangePasswordPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
$sPrevPassword = $this->jsonParam('PrevPassword');
|
$sPrevPassword = $this->jsonParam('PrevPassword');
|
||||||
$sNewPassword = $this->jsonParam('NewPassword');
|
$sNewPassword = $this->jsonParam('NewPassword');
|
||||||
|
|
||||||
$oActions = $this->Manager()->Actions();
|
|
||||||
$oAccount = $oActions->GetAccount();
|
|
||||||
|
|
||||||
if ($sPrevPassword !== $oAccount->Password()) {
|
if ($sPrevPassword !== $oAccount->Password()) {
|
||||||
throw new ClientException(static::CurrentPasswordIncorrect, null, $oActions->StaticI18N('NOTIFICATIONS/CURRENT_PASSWORD_INCORRECT'));
|
throw new ClientException(static::CurrentPasswordIncorrect, null, $oActions->StaticI18N('NOTIFICATIONS/CURRENT_PASSWORD_INCORRECT'));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue