Only active users can authenticate
This commit is contained in:
@@ -6,7 +6,7 @@ class SessionsController < ApplicationController
|
||||
end
|
||||
|
||||
def create
|
||||
if user = User.authenticate_by(params.permit(:email_address, :password))
|
||||
if user = User.active.authenticate_by(params.permit(:email_address, :password))
|
||||
start_new_session_for user
|
||||
redirect_to after_authentication_url
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user