mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-23 11:43:47 -08:00
Applying @dmeltzer’s changes from afc8ac5e72
This commit is contained in:
parent
6b31e2aca9
commit
7bb50a61a7
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue