File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -513,7 +513,7 @@ class SessionsController < ApplicationController
513
513
@user = User .find_by(email: params[:user ][:email ].downcase)
514
514
if @user
515
515
if @user .unconfirmed?
516
- redirect_to new_confirmation_path, alert: " Incorrect email or password ."
516
+ redirect_to new_confirmation_path, alert: " Please confirm your email first ."
517
517
elsif @user .authenticate(params[:user ][:password ])
518
518
login @user
519
519
redirect_to root_path, notice: " Signed in."
@@ -1283,7 +1283,7 @@ class SessionsController < ApplicationController
1283
1283
@user = User .authenticate_by(email: params[:user ][:email ].downcase, password: params[:user ][:password ])
1284
1284
if @user
1285
1285
if @user .unconfirmed?
1286
- redirect_to new_confirmation_path, alert: " Incorrect email or password ."
1286
+ redirect_to new_confirmation_path, alert: " Please confirm your email first ."
1287
1287
else
1288
1288
after_login_path = session[:user_return_to ] || root_path
1289
1289
login @user
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ def create
6
6
@user = User . authenticate_by ( email : params [ :user ] [ :email ] . downcase , password : params [ :user ] [ :password ] )
7
7
if @user
8
8
if @user . unconfirmed?
9
- redirect_to new_confirmation_path , alert : "Incorrect email or password ."
9
+ redirect_to new_confirmation_path , alert : "Please confirm your email first ."
10
10
else
11
11
after_login_path = session [ :user_return_to ] || root_path
12
12
active_session = login @user
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ class SessionsControllerTest < ActionDispatch::IntegrationTest
68
68
password : @unconfirmed_user . password
69
69
}
70
70
}
71
- assert_equal "Incorrect email or password ." , flash [ :alert ]
71
+ assert_equal "Please confirm your email first ." , flash [ :alert ]
72
72
assert_nil current_user
73
73
assert_redirected_to new_confirmation_path
74
74
end
You can’t perform that action at this time.
0 commit comments