mirror of
https://github.com/discourse/discourse.git
synced 2025-03-15 02:35:29 +08:00
FIX: only unstage staged users
This commit is contained in:
parent
52f9112d63
commit
3e06598e96
@ -270,10 +270,12 @@ class User < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def unstage
|
||||
self.staged = false
|
||||
self.custom_fields[FROM_STAGED] = true
|
||||
self.notifications.destroy_all
|
||||
DiscourseEvent.trigger(:user_unstaged, self)
|
||||
if self.staged
|
||||
self.staged = false
|
||||
self.custom_fields[FROM_STAGED] = true
|
||||
self.notifications.destroy_all
|
||||
DiscourseEvent.trigger(:user_unstaged, self)
|
||||
end
|
||||
end
|
||||
|
||||
def self.unstage(params)
|
||||
|
Loading…
x
Reference in New Issue
Block a user