]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Auth/LoginController.php
Merge branch 'auth' of git://github.com/benrubson/BookStack into benrubson-auth
[bookstack] / app / Http / Controllers / Auth / LoginController.php
index fb2573b5cc2f32abc3f3b70f7b8eeeb0c8d125ab..f031c12cf9873f468292ccbcce8ba71e6d48bc35 100644 (file)
@@ -2,6 +2,7 @@
 
 namespace BookStack\Http\Controllers\Auth;
 
+use Activity;
 use BookStack\Auth\Access\SocialAuthService;
 use BookStack\Exceptions\LoginAttemptEmailNeededException;
 use BookStack\Exceptions\LoginAttemptException;
@@ -106,6 +107,9 @@ class LoginController extends Controller
             $this->hasTooManyLoginAttempts($request)) {
             $this->fireLockoutEvent($request);
 
+            // Also log some error message
+            Activity::logFailedAccess($request->get($this->username()));
+
             return $this->sendLockoutResponse($request);
         }
 
@@ -122,6 +126,9 @@ class LoginController extends Controller
         // user surpasses their maximum number of attempts they will get locked out.
         $this->incrementLoginAttempts($request);
 
+        // Also log some error message
+        Activity::logFailedAccess($request->get($this->username()));
+
         return $this->sendFailedLoginResponse($request);
     }