From efd8599b737ee4ac845fb66d130466c5e7a12aed Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 18 Feb 2022 13:47:30 +0800 Subject: [PATCH] Fix login with email for ldap users --- 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 4392e861f997..732d54715ea3 100644 --- a/services/auth/signin.go +++ b/services/auth/signin.go @@ -64,7 +64,7 @@ func UserSignIn(username, password string) (*user_model.User, *auth.Source, erro return nil, nil, smtp.ErrUnsupportedLoginType } - user, err := authenticator.Authenticate(user, username, password) + user, err := authenticator.Authenticate(user, user.LoginName, password) if err != nil { return nil, nil, err }