mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix ldap auth plugin, broke a lot of userlevel stuff a long time ago due to mysql layer changes
git-svn-id: http://www.observium.org/svn/observer/trunk@2482 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -67,13 +67,13 @@ function user_exists($username)
|
|||||||
function get_userlevel($username)
|
function get_userlevel($username)
|
||||||
{
|
{
|
||||||
# FIXME should come from LDAP
|
# FIXME should come from LDAP
|
||||||
return dbFetchRow("SELECT `level` FROM `users` WHERE `username` = ?", array($username));
|
return dbFetchCell("SELECT `level` FROM `users` WHERE `username` = ?", array($username));
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_userid($username)
|
function get_userid($username)
|
||||||
{
|
{
|
||||||
# FIXME should come from LDAP
|
# FIXME should come from LDAP
|
||||||
return dbFetchRow("SELECT `user_id` FROM `users` WHERE `username` = ?", array($username));
|
return dbFetchCell("SELECT `user_id` FROM `users` WHERE `username` = ?", array($username));
|
||||||
}
|
}
|
||||||
|
|
||||||
function deluser($username)
|
function deluser($username)
|
||||||
|
@@ -26,14 +26,13 @@ function authenticate($username,$password)
|
|||||||
|
|
||||||
function passwordscanchange($username="")
|
function passwordscanchange($username="")
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* By default allow the password to be modified, unless the existing
|
* By default allow the password to be modified, unless the existing
|
||||||
* user is explicitly prohibited to do so.
|
* user is explicitly prohibited to do so.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (empty($username) || !user_exists($username)) {
|
if (empty($username) || !user_exists($username))
|
||||||
|
{
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
return dbFetchCell("SELECT can_modify_passwd FROM users WHERE username = ?", array($username));
|
return dbFetchCell("SELECT can_modify_passwd FROM users WHERE username = ?", array($username));
|
||||||
|
Reference in New Issue
Block a user