Added mapping roles through email to site settings (#2373)

This commit is contained in:
Ahmad Farhat
2020-12-16 19:31:32 -05:00
committed by GitHub
parent 14350c5f5d
commit 5a51f6d714
12 changed files with 202 additions and 10 deletions

View File

@ -57,7 +57,7 @@ class UsersController < ApplicationController
# Sign in automatically if email verification is disabled or if user is already verified.
if !Rails.configuration.enable_email_verification || @user.email_verified
@user.set_role :user
@user.set_role(initial_user_role(@user.email))
login(@user) && return
end