AuthCrypt.php (mrbs-1.9.4) | : | AuthCrypt.php (mrbs-1.10.0) | ||
---|---|---|---|---|
skipping to change at line 26 | skipping to change at line 26 | |||
* | * | |||
* Then, you may configure admin users: | * Then, you may configure admin users: | |||
* | * | |||
* $auth["admin"][] = "username1"; | * $auth["admin"][] = "username1"; | |||
* $auth["admin"][] = "username2"; | * $auth["admin"][] = "username2"; | |||
* | * | |||
*/ | */ | |||
class AuthCrypt extends Auth | class AuthCrypt extends Auth | |||
{ | { | |||
/* authValidateUser($user, $pass) | /* validateUser($user, $pass) | |||
* | * | |||
* Checks if the specified username/password pair are valid | * Checks if the specified username/password pair are valid | |||
* | * | |||
* $user - The user name | * $user - The user name | |||
* $pass - The password | * $pass - The password | |||
* | * | |||
* Returns: | * Returns: | |||
* false - The pair are invalid or do not exist | * false - The pair are invalid or do not exist | |||
* string - The validated username | * string - The validated username | |||
*/ | */ | |||
public function validateUser($user, $pass) | public function validateUser(?string $user, ?string $pass) | |||
{ | { | |||
global $auth; | global $auth; | |||
// Check if we do not have a username/password | // Check if we do not have a username/password | |||
if(!isset($user) || !isset($pass)) | if(!isset($user) || !isset($pass)) | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
if (!isset($auth["crypt"]["passwd_file"])) | if (!isset($auth["crypt"]["passwd_file"])) | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |