Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/sessions_controller.rb')
-rw-r--r--app/controllers/sessions_controller.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
index f8da152e3d2..1c506065b56 100644
--- a/app/controllers/sessions_controller.rb
+++ b/app/controllers/sessions_controller.rb
@@ -57,8 +57,14 @@ class SessionsController < Devise::SessionsController
reset_password_sent_at: nil)
end
- # hide the signed-in notification
- flash[:notice] = nil
+ if resource.deactivated?
+ resource.activate
+ flash[:notice] = _('Welcome back! Your account had been deactivated due to inactivity but is now reactivated.')
+ else
+ # hide the default signed-in notification
+ flash[:notice] = nil
+ end
+
log_audit_event(current_user, resource, with: authentication_method)
log_user_activity(current_user)
end