Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Nov 22, 2023
2 parents 91c3673 + 8481768 commit 996caaf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private function loginViaSaml(Request $request)

if ($user = Auth::user()) {
$user->last_login = \Carbon::now();
$user->save();
$user->saveQuietly();
}

} catch (\Exception $e) {
Expand Down Expand Up @@ -199,7 +199,7 @@ private function loginViaLdap(Request $request): User
$user->email = $ldap_attr['email'];
$user->first_name = $ldap_attr['firstname'];
$user->last_name = $ldap_attr['lastname']; //FIXME (or TODO?) - do we need to map additional fields that we now support? E.g. country, phone, etc.
$user->save();
$user->saveQuietly();
} // End if(!user)
return $user;
}
Expand Down Expand Up @@ -319,7 +319,7 @@ public function login(Request $request)
if ($user = Auth::user()) {
$user->last_login = \Carbon::now();
$user->activated = 1;
$user->save();
$user->saveQuietly();
}
// Redirect to the users page
return redirect()->intended()->with('success', trans('auth/message.signin.success'));
Expand Down Expand Up @@ -371,7 +371,7 @@ public function getTwoFactorEnroll()
[-2, -2, -2, -2]
);

$user->save(); // make sure to save *AFTER* displaying the barcode, or else we might save a two_factor_secret that we never actually displayed to the user if the barcode fails
$user->saveQuietly(); // make sure to save *AFTER* displaying the barcode, or else we might save a two_factor_secret that we never actually displayed to the user if the barcode fails

return view('auth.two_factor_enroll')->with('barcode_obj', $barcode_obj);
}
Expand Down Expand Up @@ -426,7 +426,7 @@ public function postTwoFactorAuth(Request $request)

if (Google2FA::verifyKey($user->two_factor_secret, $secret)) {
$user->two_factor_enrolled = 1;
$user->save();
$user->saveQuietly();
$request->session()->put('2fa_authed', $user->id);

return redirect()->route('home')->with('success', 'You are logged in!');
Expand Down

0 comments on commit 996caaf

Please sign in to comment.