mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 18:19:22 +03:00
Simplify LoginProcess handling
This commit is contained in:
parent
6be84f8ab4
commit
3017f8c656
9 changed files with 24 additions and 47 deletions
|
|
@ -92,15 +92,8 @@ class SnappyMailHelper
|
|||
if ($doLogin && $aCredentials[1] && $aCredentials[2]) {
|
||||
try {
|
||||
$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::DefaultOff) === \RainLoop\Enumerations\SignMeType::DefaultOn) {
|
||||
$oActions->SetSignMeToken($oAccount);
|
||||
}
|
||||
if ($oAccount && $oConfig->Get('login', 'sign_me_auto', \RainLoop\Enumerations\SignMeType::DefaultOff) === \RainLoop\Enumerations\SignMeType::DefaultOn) {
|
||||
$oActions->SetSignMeToken($oAccount);
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
// Login failure, reset password to prevent more attempts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue