Skip to content

Commit

Permalink
* [FIX] Fixed issue when retrieveing Authenticator plugin data for th…
Browse files Browse the repository at this point in the history
…e current user. Closes  #442. Thanks to @fellsho, @st3reo and @HellChords for the feedback
  • Loading branch information
nuxsmin committed Mar 2, 2017
1 parent a408962 commit 57416b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion inc/Plugins/Authenticator/ActionController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

use SP\Controller\ItemControllerInterface;
use SP\Controller\RequestControllerTrait;
use SP\Core\ActionsInterface;
use SP\Core\Plugin\PluginDataStore;
use SP\Core\Session as CoreSession;
use SP\DataModel\PluginData;
Expand Down
4 changes: 2 additions & 2 deletions inc/Plugins/Authenticator/PreferencesController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ public function getSecurityTab()
if (!$AuthenticatorData->isTwofaEnabled()) {
$IV = Util::generateRandomBytes();
$AuthenticatorData->setIV($IV);

Session::setUserData($AuthenticatorData);
} else {
$IV = $AuthenticatorData->getIV();
}

Session::setUserData($AuthenticatorData);

$twoFa = new Authenticator($UserData->getUserId(), $UserData->getUserLogin(), $IV);

$this->Controller->view->assign('qrCode', !$AuthenticatorData->isTwofaEnabled() ? $twoFa->getUserQRCode() : '');
Expand Down

0 comments on commit 57416b6

Please sign in to comment.