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

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