summaryrefslogtreecommitdiff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-13 20:06:33 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-13 20:06:33 +0300
commitfbf69899032ffd5e74e401aae7c94852a0722e92 (patch)
tree7c6fccb89ee4b26507a525e162c3c0a9148d434c /app/controllers/application_controller.rb
parent94be73202617a5b0886c348ffbaf08947ecf8b45 (diff)
downloadgitlab-ce-fbf69899032ffd5e74e401aae7c94852a0722e92.tar.gz
Force admin to change password after first sign-in
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index edb1b787dcc..fda05feefc0 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -159,7 +159,7 @@ class ApplicationController < ActionController::Base
end
def check_password_expiration
- if current_user.password_expires_at && current_user.password_expires_at < Time.now
+ if current_user && current_user.password_expires_at && current_user.password_expires_at < Time.now
redirect_to new_profile_password_path and return
end
end