I'm trying to log the IP address and login timestamps when users log into our system, and in order to do so I have overriden the authenticated() method of the LoginController :
function authenticated(Request $request, $user) {
$user->update([
'last_login_at' => Carbon::now(),
'last_ip' => $request->getClientIp()
]);
}
The strange thing is that I can see in the database that the last login from some users are several days ago, whether I know for a fact that they performed actions on the website today (while being logged-in), as shown by other logs..
Is there a possibility that authenticated() is not being fired, depending on how the user logs in?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire