mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-02 00:32:09 +02:00
Removed unused variables and updated coding style
This commit is contained in:
@@ -41,33 +41,36 @@ function authenticate($username, $password) {
|
|||||||
|
|
||||||
return $user_authenticated;
|
return $user_authenticated;
|
||||||
|
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
// group membership is not required and user is valid
|
// group membership is not required and user is valid
|
||||||
return 1;
|
return 1;
|
||||||
};
|
};
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
echo ldap_error($ds);
|
echo ldap_error($ds);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function reauthenticate($sess_id, $token) {
|
function reauthenticate() {
|
||||||
// not supported so return 0
|
// not supported so return 0
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function passwordscanchange($username='') {
|
function passwordscanchange() {
|
||||||
// not supported so return 0
|
// not supported so return 0
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function changepassword($username, $newpassword) {
|
function changepassword() {
|
||||||
// not supported so return 0
|
// not supported so return 0
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -79,7 +82,7 @@ function auth_usermanagement() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function adduser($username, $password, $level, $email='', $realname='', $can_modify_passwd='1') {
|
function adduser() {
|
||||||
// not supported so return 0
|
// not supported so return 0
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -219,7 +222,8 @@ function get_fullname($username) {
|
|||||||
$entries = ldap_get_entries($ds, $result);
|
$entries = ldap_get_entries($ds, $result);
|
||||||
if ($entries['count'] > 0) {
|
if ($entries['count'] > 0) {
|
||||||
$membername = $entries[0]['name'][0];
|
$membername = $entries[0]['name'][0];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$membername = $username;
|
$membername = $username;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,7 +267,8 @@ function get_dn($samaccountname) {
|
|||||||
$entries = ldap_get_entries($ds, $result);
|
$entries = ldap_get_entries($ds, $result);
|
||||||
if ($entries['count'] > 0) {
|
if ($entries['count'] > 0) {
|
||||||
return $entries[0]['dn'];
|
return $entries[0]['dn'];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user