forked from External/greenlight
GRN2-6: Added the ability for admins to specify registration method (#520)
* Added the ability to invite users * Small bug fix * Added the ability to approve/decline users * Small bug fixes * More bug fixes * More minor changes * Final changes
This commit is contained in:
committed by
Jesus Federico
parent
adf4b68008
commit
720dac6012
@ -32,6 +32,10 @@ class AccountActivationsController < ApplicationController
|
||||
if @user && !@user.activated? && @user.authenticated?(:activation, params[:token])
|
||||
@user.activate
|
||||
|
||||
# Redirect user to root with account pending flash if account is still pending
|
||||
return redirect_to root_path,
|
||||
flash: { success: I18n.t("registration.approval.signup") } if @user.has_role?(:pending)
|
||||
|
||||
flash[:success] = I18n.t("verify.activated") + " " + I18n.t("verify.signin")
|
||||
redirect_to signin_path
|
||||
else
|
||||
|
Reference in New Issue
Block a user