mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: reason to reject user signup (#11700)
Feature for `Must Approve Users` setup. When a user is rejected, a staff member can optionally set a reason for audit purposes. In addition, feedback email can be sent to the user. Meta: https://meta.discourse.org/t/account-rejection-email/103112/8
This commit is contained in:
committed by
GitHub
parent
add125aacf
commit
06b7c44593
@@ -37,6 +37,14 @@ class UserNotifications < ActionMailer::Base
|
||||
new_user_tips: tips)
|
||||
end
|
||||
|
||||
def signup_after_reject(user, opts = {})
|
||||
locale = user_locale(user)
|
||||
build_email(user.email,
|
||||
template: 'user_notifications.signup_after_reject',
|
||||
locale: locale,
|
||||
reject_reason: opts[:reject_reason])
|
||||
end
|
||||
|
||||
def suspicious_login(user, opts = {})
|
||||
ipinfo = DiscourseIpInfo.get(opts[:client_ip])
|
||||
location = ipinfo[:location]
|
||||
|
||||
Reference in New Issue
Block a user