mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Other solutions for nextcloud auto login #1247 due to a TOTP conflict
This commit is contained in:
parent
31d50cf67e
commit
26b7abf893
6 changed files with 17 additions and 18 deletions
|
|
@ -80,12 +80,13 @@ class SnappyMailHelper
|
|||
if ($doLogin && $aCredentials[1] && $aCredentials[2]) {
|
||||
try {
|
||||
$oActions->Logger()->AddSecret($aCredentials[2]);
|
||||
|
||||
$bSignMe = $oConfig->Get('login', 'sign_me_auto', \RainLoop\Enumerations\SignMeType::DEFAULT_OFF) === \RainLoop\Enumerations\SignMeType::DEFAULT_ON;
|
||||
$oAccount = $oActions->LoginProcess($aCredentials[1], $aCredentials[2], $bSignMe);
|
||||
$oAccount = $oActions->LoginProcess($aCredentials[1], $aCredentials[2]);
|
||||
if ($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);
|
||||
}
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
// Login failure, reset password to prevent more attempts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue