mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-10 01:01:30 +03:00
Merge pull request #443 from KuroSetsuna29/fix-ldap-login
Fixed issue preventing LDAP to create new account
This commit is contained in:
@@ -140,7 +140,7 @@ exports.registerUser = async function(req, res) {
|
|||||||
|
|
||||||
exports.login = async (username, password) => {
|
exports.login = async (username, password) => {
|
||||||
const user = await db_api.getRecord('users', {name: username});
|
const user = await db_api.getRecord('users', {name: username});
|
||||||
if (!user) { logger.error(`User ${username} not found`); false }
|
if (!user) { logger.error(`User ${username} not found`); return false }
|
||||||
if (user.auth_method && user.auth_method !== 'internal') { return false }
|
if (user.auth_method && user.auth_method !== 'internal') { return false }
|
||||||
return await bcrypt.compare(password, user.passhash) ? user : false;
|
return await bcrypt.compare(password, user.passhash) ? user : false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user