From cb90eda2130038c0b8e702a50913188123695d62 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Tue, 1 Mar 2022 02:14:50 +0800 Subject: [PATCH] Fix login with email panic when email is not exist (#18942) Co-authored-by: 6543 <6543@obermui.de> --- services/auth/signin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/auth/signin.go b/services/auth/signin.go index 1b5b7f5d2a18..aa9a9660c039 100644 --- a/services/auth/signin.go +++ b/services/auth/signin.go @@ -32,7 +32,7 @@ func UserSignIn(username, password string) (*user_model.User, *auth.Source, erro } if !has { return nil, nil, user_model.ErrEmailAddressNotExist{ - Email: user.Email, + Email: username, } } user = &user_model.User{ID: emailAddress.UID}