diff --git a/out/out.Setup2Factor.php b/out/out.Setup2Factor.php index f754c864f..f2479c718 100644 --- a/out/out.Setup2Factor.php +++ b/out/out.Setup2Factor.php @@ -24,7 +24,7 @@ require_once("inc/inc.Authentication.php"); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); -$accessop = new SeedDMS_AccessOperation($dms, $user, $settings); +$accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); if ($user->isGuest()) { UI::exitError(getMLText("2_factor_auth"),getMLText("access_denied")); diff --git a/views/bootstrap/class.Setup2Factor.php b/views/bootstrap/class.Setup2Factor.php index 3b9bf0b62..03c056b25 100644 --- a/views/bootstrap/class.Setup2Factor.php +++ b/views/bootstrap/class.Setup2Factor.php @@ -21,6 +21,10 @@ */ require "vendor/autoload.php"; +use RobThree\Auth\TwoFactorAuth; +use RobThree\Auth\Providers\Qr\BaconQrCodeProvider; +use RobThree\Auth\Providers\Qr\EndroidQrCodeProvider; + /** * Class which outputs the html page for ForcePasswordChange view * @@ -80,7 +84,10 @@ $(document).ready( function() { $this->rowStart(); $this->contentContainerStart('span6'); - $tfa = new \RobThree\Auth\TwoFactorAuth('SeedDMS: '.$sitename); + /* BaconQrCodeProvider requires imagick + $tfa = new TwoFactorAuth(new BaconQrCodeProvider()); + */ + $tfa = new TwoFactorAuth(new EndroidQrCodeProvider()); $oldsecret = $user->getSecret(); $secret = $tfa->createSecret(); ?>