changed variable "user1" to "user"

I used "user1", because Im not sure about the scope inside the anonymous callback functions
This commit is contained in:
gizmo1-11 2023-08-14 14:22:46 +02:00 committed by yzx9
parent a107b6444c
commit a382fbc194

View file

@ -186,7 +186,7 @@ const AuthenticationManager = {
createIfNotExistAndLogin( createIfNotExistAndLogin(
query, query,
user1, user,
callback, callback,
uid, uid,
firstname, firstname,
@ -194,7 +194,7 @@ const AuthenticationManager = {
mail, mail,
isAdmin isAdmin
) { ) {
if (!user1) { if (!user) {
//console.log('Creating User:' + JSON.stringify(query)) //console.log('Creating User:' + JSON.stringify(query))
//create random pass for local userdb, does not get checked for ldap users during login //create random pass for local userdb, does not get checked for ldap users during login
let pass = require("crypto").randomBytes(32).toString("hex") let pass = require("crypto").randomBytes(32).toString("hex")
@ -228,7 +228,7 @@ const AuthenticationManager = {
} }
) // end register user ) // end register user
} else { } else {
AuthenticationManager.login(user1, "randomPass", callback) AuthenticationManager.login(user, "randomPass", callback)
} }
}, },