fix(be): issue with login after new ldap user creaded

This commit is contained in:
Denis Gukov 2021-08-30 11:05:41 +05:00
parent 81e50f82ef
commit 07559d61b3

View File

@ -131,8 +131,7 @@ func login(w http.ResponseWriter, r *http.Request) {
if err == db.ErrNotFound {
if ldapUser != nil {
// create new LDAP user
user = *ldapUser
_, err = helpers.Store(r).CreateUserWithoutPassword(user)
user, err = helpers.Store(r).CreateUserWithoutPassword(*ldapUser)
if err != nil {
panic(err)
}