AuthPop3.php (mrbs-1.9.4) | : | AuthPop3.php (mrbs-1.10.0) | ||
---|---|---|---|---|
skipping to change at line 22 | skipping to change at line 22 | |||
* $auth["type"] = "pop3"; | * $auth["type"] = "pop3"; | |||
* | * | |||
* Then, you may configure admin users: | * Then, you may configure admin users: | |||
* | * | |||
* $auth["admin"][] = "pop3user1"; | * $auth["admin"][] = "pop3user1"; | |||
* $auth["admin"][] = "pop3user2"; | * $auth["admin"][] = "pop3user2"; | |||
*/ | */ | |||
class AuthPop3 extends Auth | class AuthPop3 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 $pop3_host, $pop3_port; | global $pop3_host, $pop3_port; | |||
$match = array(); | $match = array(); | |||
$shared_secret = ''; | $shared_secret = ''; | |||
$all_pop3_hosts = array(); | $all_pop3_hosts = array(); | |||
$all_pop3_ports = array(); | $all_pop3_ports = array(); | |||
// Check if we do not have a username/password | // Check if we do not have a username/password | |||
if (!isset($user) || !isset($pass) || strlen($pass)==0) | if (!isset($user) || !isset($pass) || strlen($pass)==0) | |||
skipping to change at line 154 | skipping to change at line 154 | |||
} | } | |||
fputs($stream, "QUIT\r\n"); | fputs($stream, "QUIT\r\n"); | |||
} | } | |||
} | } | |||
// return failure | // return failure | |||
return false; | return false; | |||
} | } | |||
// Checks whether validation of a user by email address is possible and allowe d. | // Checks whether validation of a user by email address is possible and allowe d. | |||
public function canValidateByEmail() | public function canValidateByEmail() : bool | |||
{ | { | |||
return true; | return true; | |||
} | } | |||
} | } | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added |