mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 19:30:23 -06:00
Merge pull request #4788 from davidtaylorhq/user_seen_event
Add a user_seen DiscourseEvent for plugins to hook into
This commit is contained in:
commit
0d67b507dc
@ -521,6 +521,8 @@ class User < ActiveRecord::Base
|
||||
# using update_column to avoid the AR transaction
|
||||
update_column(:last_seen_at, now)
|
||||
update_column(:first_seen_at, now) unless self.first_seen_at
|
||||
|
||||
DiscourseEvent.trigger(:user_seen, self)
|
||||
end
|
||||
|
||||
def self.gravatar_template(email)
|
||||
|
Loading…
Reference in New Issue
Block a user