mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 17:37:02 +03:00
Improve solution for #1241
This commit is contained in:
parent
0064a44031
commit
bd737a82bf
4 changed files with 22 additions and 28 deletions
|
|
@ -47,6 +47,7 @@ trait User
|
|||
}
|
||||
|
||||
// Must be here due to bug #1241
|
||||
$this->SetMainAuthAccount($oAccount);
|
||||
$this->Plugins()->RunHook('login.success', array($oAccount));
|
||||
|
||||
$this->SetAuthToken($oAccount);
|
||||
|
|
|
|||
|
|
@ -290,10 +290,15 @@ trait UserAuth
|
|||
return $this->oMainAuthAccount;
|
||||
}
|
||||
|
||||
public function SetAuthToken(MainAccount $oAccount): void
|
||||
public function SetMainAuthAccount(MainAccount $oAccount): void
|
||||
{
|
||||
$this->oAdditionalAuthAccount = false;
|
||||
$this->oMainAuthAccount = $oAccount;
|
||||
}
|
||||
|
||||
public function SetAuthToken(MainAccount $oAccount): void
|
||||
{
|
||||
$this->SetMainAuthAccount($oAccount);
|
||||
static::SetAccountCookie(self::AUTH_SPEC_TOKEN_KEY, $oAccount);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue