protected validateCredentials ( string $username, string $password ) | ||
$username | string | |
$password | string |
protected function validateCredentials($username, $password)
{
if (empty($username)) {
// Check for an empty username.
throw new UsernameRequiredException('A username must be specified.');
}
if (empty($password)) {
// Check for an empty password.
throw new PasswordRequiredException('A password must be specified.');
}
}