Feature #29041 » user.rb.patch
user.rb (working copy) | ||
---|---|---|
445 | 445 |
if Setting.session_timeout? |
446 | 446 |
scope = scope.where("updated_on > ?", Setting.session_timeout.to_i.minutes.ago) |
447 | 447 |
end |
448 |
scope.update_all(:updated_on => Time.now) == 1 |
|
448 |
last_updated = scope.maximum(:updated_on) |
|
449 |
if last_updated.nil? || last_updated <= 1.minute.ago |
|
450 |
scope.update_all(:updated_on => Time.now) == 1 |
|
451 |
else |
|
452 |
true |
|
453 |
end |
|
449 | 454 |
end |
450 | 455 | |
451 | 456 |
# Return an array of project ids for which the user has explicitly turned mail notifications on |