Retry fetching user after CanLogin

This commit is contained in:
Jan Eitzinger 2023-08-16 17:21:12 +02:00
parent 65cf86586a
commit 80aed87415

View File

@ -211,6 +211,10 @@ func (auth *Authentication) Login(
if !authenticator.CanLogin(dbUser, username, rw, r) {
continue
}
dbUser, err = auth.GetUser(username)
if err != nil && err != sql.ErrNoRows {
log.Errorf("Error while loading user '%v'", username)
}
user, err := authenticator.Login(dbUser, rw, r)
if err != nil {