修改bug《登录密码错误报错》

Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
alan 2014-11-22 17:45:09 +08:00
parent 0049f921b9
commit 88ab53730b
1 changed files with 3 additions and 1 deletions

View File

@ -364,7 +364,9 @@ class User < Principal
end
end
end
last_login_on = user.last_login_on.nil? ? '' : user.last_login_on.to_s
unless user.nil?
last_login_on = user.last_login_on.nil? ? '' : user.last_login_on.to_s
end
user.update_column(:last_login_on, Time.now) if user && !user.new_record?
[user, last_login_on]
rescue => text