mirror of
https://github.com/discourse/discourse.git
synced 2025-03-15 19:05:48 +08:00
FIX: only unstage staged users
This commit is contained in:
parent
52f9112d63
commit
3e06598e96
@ -270,11 +270,13 @@ class User < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def unstage
|
||||
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)
|
||||
if user = User.where(staged: true).with_email(params[:email].strip.downcase).first
|
||||
|
Loading…
x
Reference in New Issue
Block a user