mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: if approving a user when must_approve_users is false, don't send an email
This commit is contained in:
@@ -850,11 +850,13 @@ class User < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def send_approval_email
|
||||
Jobs.enqueue(:user_email,
|
||||
type: :signup_after_approval,
|
||||
user_id: id,
|
||||
email_token: email_tokens.first.token
|
||||
)
|
||||
if SiteSetting.must_approve_users
|
||||
Jobs.enqueue(:user_email,
|
||||
type: :signup_after_approval,
|
||||
user_id: id,
|
||||
email_token: email_tokens.first.token
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def set_default_email_digest
|
||||
|
||||
Reference in New Issue
Block a user