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? |
|
450 |
false |
|
451 |
elsif last_updated <= 1.minute.ago |
|
452 |
scope.update_all(:updated_on => Time.now) == 1 |
|
453 |
else |
|
454 |
true |
|
455 |
end |
|
449 | 456 |
end |
450 | 457 | |
451 | 458 |
# Return an array of project ids for which the user has explicitly turned mail notifications on |