Only active users can authenticate

This commit is contained in:
Jeffrey Hardy
2024-09-24 15:51:38 -04:00
parent ee67d485c4
commit 1d2de248ee
+1 -1
View File
@@ -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