Login: Fix log warning being shown on not allowed password change

pull/1121/head
Michael Frister 11 years ago
parent 66d0324060
commit 09cbe712b2
  1. 3
      app/controllers/account_controller.rb

@ -338,8 +338,9 @@ class AccountController < ApplicationController
end
def redirect_if_password_change_not_allowed(user)
logger.warn "Password change for user '#{user}' forced, but user is not allowed to change password"
if user and not user.change_password_allowed?
logger.warn "Password change for user '#{user}' forced, but user is not allowed " +
"to change password"
flash[:error] = l(:notice_can_t_change_password)
redirect_to :action => 'login'
return true

Loading…
Cancel
Save