From 17c5a748f762cba802a4ba20aa28e9797b146234 Mon Sep 17 00:00:00 2001 From: Till Faelligen <2353100+S7evinK@users.noreply.github.com> Date: Fri, 23 Dec 2022 16:25:39 +0100 Subject: [PATCH] Make Sytest/Complement happy again --- clientapi/auth/password.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/clientapi/auth/password.go b/clientapi/auth/password.go index 50c026a43..f2b0383ab 100644 --- a/clientapi/auth/password.go +++ b/clientapi/auth/password.go @@ -101,10 +101,6 @@ func (t *LoginTypePassword) Login(ctx context.Context, req interface{}) (*Login, } } - // Set the user, so login.Username() can do the right thing - r.Identifier.User = strings.ToLower(localpart) - r.User = strings.ToLower(localpart) // deprecated - // If we couldn't find the user by the lower cased localpart, try the provided // localpart as is. if !res.Exists { @@ -127,8 +123,9 @@ func (t *LoginTypePassword) Login(ctx context.Context, req interface{}) (*Login, JSON: jsonerror.Forbidden("The username or password was incorrect or the account does not exist."), } } - r.Identifier.User = localpart - r.User = localpart } + // Set the user, so login.Username() can do the right thing + r.Identifier.User = res.Account.UserID + r.User = res.Account.UserID return &r.Login, nil }