mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-24 14:57:26 +08:00
Resolved Issue #84
This commit is contained in:
parent
d1f43f49b7
commit
55a581f922
2 changed files with 18 additions and 11 deletions
|
@ -348,3 +348,21 @@ $Plugin->addHook('hook.name', 'functionName');
|
||||||
|
|
||||||
### service.app-delay-start-end
|
### service.app-delay-start-end
|
||||||
no params
|
no params
|
||||||
|
|
||||||
|
# JavaScript Events
|
||||||
|
|
||||||
|
## mailbox
|
||||||
|
### mailbox.message-list.selector.go-up
|
||||||
|
### mailbox.message-list.selector.go-down
|
||||||
|
### mailbox.message-view.toggle-full-screen
|
||||||
|
### mailbox.inbox-unread-count
|
||||||
|
### mailbox.message.show
|
||||||
|
## audio
|
||||||
|
### audio.start
|
||||||
|
### audio.stop
|
||||||
|
### audio.api.stop
|
||||||
|
## Misc
|
||||||
|
### idle
|
||||||
|
### rl-layout
|
||||||
|
### rl-view-model
|
||||||
|
event.detail = the ViewModel class
|
||||||
|
|
|
@ -16,7 +16,6 @@ class TwoFactorAuthPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
{
|
{
|
||||||
$this->UseLangs(true);
|
$this->UseLangs(true);
|
||||||
|
|
||||||
// $this->addCss('style.less');
|
|
||||||
$this->addJs('js/TwoFactorAuthLogin.js');
|
$this->addJs('js/TwoFactorAuthLogin.js');
|
||||||
$this->addJs('js/TwoFactorAuthSettings.js');
|
$this->addJs('js/TwoFactorAuthSettings.js');
|
||||||
|
|
||||||
|
@ -103,8 +102,6 @@ class TwoFactorAuthPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
))
|
))
|
||||||
);
|
);
|
||||||
|
|
||||||
// $this->Manager()->Actions()->requestSleep();
|
|
||||||
|
|
||||||
return $this->jsonResponse(__FUNCTION__, $this->getTwoFactorInfo($oAccount));
|
return $this->jsonResponse(__FUNCTION__, $this->getTwoFactorInfo($oAccount));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +127,6 @@ class TwoFactorAuthPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
return $this->jsonResponse(__FUNCTION__, false);
|
return $this->jsonResponse(__FUNCTION__, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// $this->Manager()->Actions()->setSettingsFromParams($oSettings, 'EnableTwoFactor', 'bool');
|
|
||||||
$oSettings = $this->Manager()->Actions()->SettingsProvider()->Load($oAccount);
|
$oSettings = $this->Manager()->Actions()->SettingsProvider()->Load($oAccount);
|
||||||
if ($this->Manager()->Actions()->HasActionParam('EnableTwoFactor')) {
|
if ($this->Manager()->Actions()->HasActionParam('EnableTwoFactor')) {
|
||||||
$sValue = $this->GetActionParam('EnableTwoFactor', '');
|
$sValue = $this->GetActionParam('EnableTwoFactor', '');
|
||||||
|
@ -171,13 +167,6 @@ class TwoFactorAuthPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
$aData = $this->getTwoFactorInfo($oAccount);
|
$aData = $this->getTwoFactorInfo($oAccount);
|
||||||
$sSecret = !empty($aData['Secret']) ? $aData['Secret'] : '';
|
$sSecret = !empty($aData['Secret']) ? $aData['Secret'] : '';
|
||||||
|
|
||||||
// $this->Logger()->WriteDump(array(
|
|
||||||
// $sCode, $sSecret, $aData,
|
|
||||||
// $this->TwoFactorAuthProvider($oAccount)->VerifyCode($sSecret, $sCode)
|
|
||||||
// ));
|
|
||||||
|
|
||||||
// $this->Manager()->Actions()->requestSleep();
|
|
||||||
|
|
||||||
return $this->jsonResponse(__FUNCTION__,
|
return $this->jsonResponse(__FUNCTION__,
|
||||||
$this->TwoFactorAuthProvider($oAccount)->VerifyCode($sSecret, $sCode));
|
$this->TwoFactorAuthProvider($oAccount)->VerifyCode($sSecret, $sCode));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue