From c63c4620d1c659712cec93e354e84f5017bd6254 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sun, 2 Aug 2026 23:55:38 +0200 Subject: Log user logins and reconstruct last activity from logs --- app/controllers/otp_challenges_controller.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/controllers/otp_challenges_controller.rb') diff --git a/app/controllers/otp_challenges_controller.rb b/app/controllers/otp_challenges_controller.rb index 2526d1fb..5a834ed0 100644 --- a/app/controllers/otp_challenges_controller.rb +++ b/app/controllers/otp_challenges_controller.rb @@ -28,6 +28,8 @@ class OtpChallengesController < ApplicationController reset_session self.current_user = user session[:logged_in_at] = Time.now.to_i + user.update_column(:last_login_at, Time.now) + # an admin who logs in and goes straight to user management # is already elevated elevate! if user.is_admin? -- cgit v1.3