mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 14:37:02 +03:00
Enhancement to Two Factor Auth (Closes #131)
This commit is contained in:
parent
e211899c7b
commit
365a79049e
30 changed files with 359 additions and 208 deletions
|
|
@ -4721,6 +4721,28 @@ class Actions
|
|||
$this->getTwoFactorInfo($sEmail));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function DoShowTwoFactorSecret()
|
||||
{
|
||||
if (!$this->TwoFactorAuthProvider()->IsActive())
|
||||
{
|
||||
return $this->FalseResponse(__FUNCTION__);
|
||||
}
|
||||
|
||||
$oAccount = $this->getAccountFromToken();
|
||||
$sEmail = $oAccount->ParentEmailHelper();
|
||||
|
||||
$aResult = $this->getTwoFactorInfo($sEmail);
|
||||
if (\is_array($aResult))
|
||||
{
|
||||
unset($aResult['BackupCodes']);
|
||||
}
|
||||
|
||||
return $this->DefaultResponse(__FUNCTION__, $aResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue