Add central function to persist users on Login

This commit is contained in:
2024-03-28 14:22:23 +01:00
parent 50401e0030
commit 6828c97415
6 changed files with 36 additions and 15 deletions

View File

@@ -199,9 +199,7 @@ func (ja *JWTCookieSessionAuthenticator) Login(
}
if jc.SyncUserOnLogin {
if err := repository.GetUserRepository().AddUser(user); err != nil {
log.Errorf("Error while adding user '%s' to DB", user.Username)
}
persistUser(user)
}
}