forked from External/greenlight
Revert "Notify admins when a approval/invite user signs up"
This reverts commit 251d85d88a
.
This commit is contained in:
@ -50,8 +50,6 @@ class UsersController < ApplicationController
|
||||
flash: { success: I18n.t("registration.approval.signup") } unless Rails.configuration.enable_email_verification
|
||||
end
|
||||
|
||||
send_registration_email if Rails.configuration.enable_email_verification
|
||||
|
||||
# Sign in automatically if email verification is disabled or if user is already verified.
|
||||
login(@user) && return if !Rails.configuration.enable_email_verification || @user.email_verified
|
||||
|
||||
@ -195,19 +193,6 @@ class UsersController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def send_registration_email
|
||||
begin
|
||||
if invite_registration
|
||||
send_invite_user_signup_email(@user)
|
||||
elsif approval_registration
|
||||
send_approval_user_signup_email(@user)
|
||||
end
|
||||
rescue => e
|
||||
logger.error "Error in email delivery: #{e}"
|
||||
flash[:alert] = I18n.t(params[:message], default: I18n.t("delivery_error"))
|
||||
end
|
||||
end
|
||||
|
||||
# Add validation errors to model if they exist
|
||||
def valid_user_or_captcha
|
||||
valid_user = @user.valid?
|
||||
|
Reference in New Issue
Block a user