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:
parent
8585cda7b1
commit
9bf98bce26
|
@ -182,7 +182,7 @@ class User < Principal
|
||||||
end
|
end
|
||||||
end
|
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
|
user
|
||||||
rescue => text
|
rescue => text
|
||||||
raise text
|
raise text
|
||||||
|
@ -195,7 +195,7 @@ class User < Principal
|
||||||
if tokens.size == 1
|
if tokens.size == 1
|
||||||
token = tokens.first
|
token = tokens.first
|
||||||
if (token.created_on > Setting.autologin.to_i.day.ago) && token.user && token.user.active?
|
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
|
token.user
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue