Skip to content

Commit 6bbe641

Browse files
authored
Merge pull request #11138 from nanaya/login-log
Log login and forced password reset separately
2 parents 4c60d39 + 4fe8121 commit 6bbe641

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Diff for: app/Http/Controllers/SessionsController.php

+2
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public function store()
7777
$forceReactivation = new ForceReactivation($user, $request);
7878

7979
if ($forceReactivation->isRequired()) {
80+
DatadogLoginAttempt::log('password_reset');
8081
$forceReactivation->run();
8182

8283
\Session::flash('password_reset_start', [
@@ -87,6 +88,7 @@ public function store()
8788
return ujs_redirect(route('password-reset'));
8889
}
8990

91+
DatadogLoginAttempt::log(null);
9092
$this->login($user, $remember);
9193

9294
return [

Diff for: app/Models/User.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2078,9 +2078,9 @@ public static function attemptLogin($user, $password, $ip = null)
20782078
}
20792079
}
20802080

2081-
DatadogLoginAttempt::log($authError);
20822081

20832082
if ($authError !== null) {
2083+
DatadogLoginAttempt::log($authError);
20842084
LoginAttempt::logAttempt($ip, $user, 'fail', $password);
20852085

20862086
return osu_trans('users.login.failed');

0 commit comments

Comments
 (0)