mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Apply fixes from StyleCI (#13208)
This commit is contained in:
@@ -10,7 +10,7 @@ interface Authorizer
|
||||
* Authenticate the user and password.
|
||||
* Some Authorizer methods may only check username.
|
||||
*
|
||||
* @param array $credentials
|
||||
* @param array $credentials
|
||||
* @return true throws an Exception on failure
|
||||
* @throws AuthenticationException thrown if the username or password is invalid
|
||||
*/
|
||||
@@ -19,8 +19,8 @@ interface Authorizer
|
||||
/**
|
||||
* Check if a $username exists.
|
||||
*
|
||||
* @param string $username
|
||||
* @param bool $throw_exception Allows for a message to be sent to callers in case the user does not exist
|
||||
* @param string $username
|
||||
* @param bool $throw_exception Allows for a message to be sent to callers in case the user does not exist
|
||||
* @return bool
|
||||
*/
|
||||
public function userExists($username, $throw_exception = false);
|
||||
@@ -28,7 +28,7 @@ interface Authorizer
|
||||
/**
|
||||
* Get the userlevel of $username
|
||||
*
|
||||
* @param string $username The username to check
|
||||
* @param string $username The username to check
|
||||
* @return int
|
||||
*/
|
||||
public function getUserlevel($username);
|
||||
@@ -36,7 +36,7 @@ interface Authorizer
|
||||
/**
|
||||
* Get the user_id of $username
|
||||
*
|
||||
* @param string $username
|
||||
* @param string $username
|
||||
* @return int
|
||||
*/
|
||||
public function getUserid($username);
|
||||
@@ -53,7 +53,7 @@ interface Authorizer
|
||||
* level
|
||||
* can_modify_passwd
|
||||
*
|
||||
* @param int $user_id
|
||||
* @param int $user_id
|
||||
* @return array|false
|
||||
*/
|
||||
public function getUser($user_id);
|
||||
@@ -61,13 +61,13 @@ interface Authorizer
|
||||
/**
|
||||
* Add a new user.
|
||||
*
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
* @param int $level
|
||||
* @param string $email
|
||||
* @param string $realname
|
||||
* @param int $can_modify_passwd If this user is allowed to edit their password
|
||||
* @param string $description
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
* @param int $level
|
||||
* @param string $email
|
||||
* @param string $realname
|
||||
* @param int $can_modify_passwd If this user is allowed to edit their password
|
||||
* @param string $description
|
||||
* @return int|false Returns the added user_id or false if adding failed
|
||||
*/
|
||||
public function addUser($username, $password, $level = 0, $email = '', $realname = '', $can_modify_passwd = 0, $description = '');
|
||||
@@ -75,18 +75,18 @@ interface Authorizer
|
||||
/**
|
||||
* Update the some of the fields of a user
|
||||
*
|
||||
* @param int $user_id The user_id to update
|
||||
* @param string $realname
|
||||
* @param int $level
|
||||
* @param int $can_modify_passwd
|
||||
* @param string $email
|
||||
* @param int $user_id The user_id to update
|
||||
* @param string $realname
|
||||
* @param int $level
|
||||
* @param int $can_modify_passwd
|
||||
* @param string $email
|
||||
* @return bool If the update was successful
|
||||
*/
|
||||
public function updateUser($user_id, $realname, $level, $can_modify_passwd, $email);
|
||||
|
||||
/**
|
||||
* @param string $username The $username to update
|
||||
* @param string $newpassword
|
||||
* @param string $username The $username to update
|
||||
* @param string $newpassword
|
||||
* @return bool If the update was successful
|
||||
*/
|
||||
public function changePassword($username, $newpassword);
|
||||
@@ -94,7 +94,7 @@ interface Authorizer
|
||||
/**
|
||||
* Delete a user.
|
||||
*
|
||||
* @param int $user_id
|
||||
* @param int $user_id
|
||||
* @return bool If the deletion was successful
|
||||
*/
|
||||
public function deleteUser($user_id);
|
||||
@@ -126,7 +126,7 @@ interface Authorizer
|
||||
/**
|
||||
* Check if this Authorizer can set new passwords.
|
||||
*
|
||||
* @param string $username Optionally, check if $username can set their own password
|
||||
* @param string $username Optionally, check if $username can set their own password
|
||||
* @return bool
|
||||
*/
|
||||
public function canUpdatePasswords($username = '');
|
||||
|
Reference in New Issue
Block a user