Skip to content

Commit b714239

Browse files
Merge branch '142-fix-log-in' of git.containerum.net:ch/user-manager into develop
2 parents f55e5a7 + 593a13b commit b714239

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/server/impl/login.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ func (u *serverImpl) BasicLogin(ctx context.Context, request models.LoginRequest
2929
return resp, cherry.ErrLoginFailed()
3030
}
3131

32+
if err = u.loginUserChecks(ctx, user); err != nil {
33+
return nil, err
34+
}
35+
3236
profile, err := u.svc.DB.GetProfileByUser(ctx, user)
3337
if dbErr := u.handleDBError(err); dbErr != nil {
3438
u.log.WithError(dbErr)
3539
return resp, cherry.ErrLoginFailed()
3640
}
3741

38-
if err = u.loginUserChecks(ctx, user); err != nil {
39-
return nil, err
40-
}
41-
4242
if !utils.CheckPassword(request.Login, request.Password, user.Salt, user.PasswordHash) {
4343
u.log.WithError(cherry.ErrInvalidLogin())
4444
return nil, cherry.ErrInvalidLogin()

0 commit comments

Comments
 (0)