Skip callbacks when updating last_login_on.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11294 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2013-02-01 18:32:12 +00:00
parent 8585cda7b1
commit 9bf98bce26
1 changed files with 2 additions and 2 deletions

View File

@ -182,7 +182,7 @@ class User < Principal
end
end
end
user.update_attribute(:last_login_on, Time.now) if user && !user.new_record?
user.update_column(:last_login_on, Time.now) if user && !user.new_record?
user
rescue => text
raise text
@ -195,7 +195,7 @@ class User < Principal
if tokens.size == 1
token = tokens.first
if (token.created_on > Setting.autologin.to_i.day.ago) && token.user && token.user.active?
token.user.update_attribute(:last_login_on, Time.now)
token.user.update_column(:last_login_on, Time.now)
token.user
end
end