mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Improve solution for #1241
This commit is contained in:
parent
0064a44031
commit
bd737a82bf
4 changed files with 22 additions and 28 deletions
|
|
@ -82,11 +82,14 @@ class SnappyMailHelper
|
|||
$oActions->Logger()->AddSecret($aCredentials[2]);
|
||||
$oAccount = $oActions->LoginProcess($aCredentials[1], $aCredentials[2]);
|
||||
if ($oAccount) {
|
||||
// Must be here due to bug #1241
|
||||
$oActions->SetMainAuthAccount($oAccount);
|
||||
$oActions->Plugins()->RunHook('login.success', array($oAccount));
|
||||
|
||||
$oActions->SetAuthToken($oAccount);
|
||||
if ($oConfig->Get('login', 'sign_me_auto', \RainLoop\Enumerations\SignMeType::DEFAULT_OFF) === \RainLoop\Enumerations\SignMeType::DEFAULT_ON) {
|
||||
$oActions->SetSignMeToken($oAccount);
|
||||
}
|
||||
$oActions->Plugins()->RunHook('login.success', array($oAccount));
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
// Login failure, reset password to prevent more attempts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue