Applying @dmeltzer’s changes from afc8ac5e72

This commit is contained in:
snipe 2018-07-24 20:11:35 -07:00
parent 6b31e2aca9
commit 7bb50a61a7
2 changed files with 5 additions and 4 deletions

View file

@ -214,7 +214,7 @@ class LoginController extends Controller
}
$user = Auth::user();
$google2fa = app()->make('PragmaRX\Google2FA\Contracts\Google2FA');
$google2fa = app()->make('pragmarx.google2fa');
if ($user->two_factor_secret=='') {
$user->two_factor_secret = $google2fa->generateSecretKey(32);
@ -222,7 +222,7 @@ class LoginController extends Controller
}
$google2fa_url = $google2fa->getQRCodeGoogleUrl(
$google2fa_url = $google2fa->getQRCodeInline(
urlencode(Setting::getSettings()->site_name),
urlencode($user->username),
$user->two_factor_secret
@ -257,7 +257,7 @@ class LoginController extends Controller
$user = Auth::user();
$secret = $request->get('two_factor_secret');
$google2fa = app()->make('PragmaRX\Google2FA\Contracts\Google2FA');
$google2fa = app()->make('pragmarx.google2fa');
$valid = $google2fa->verifyKey($user->two_factor_secret, $secret);
if ($valid) {

View file

@ -115,7 +115,8 @@ abstract class Importer
public function import()
{
$headerRow = $this->csv->fetchOne();
$results = $this->normalizeInputArray($this->csv->fetchAssoc());
$this->csv->setHeaderOffset(0);
$results = $this->normalizeInputArray($this->csv->getRecords());
$this->populateCustomFields($headerRow);