validateUser($php_auth_user, self::getAuthPassword()) === false) { return parent::getCurrentUser(); } return auth()->getUser($php_auth_user); } public function getLogoffFormParams() : ?array { // Just return null - you can't log off // (well, there are ways of achieving a logoff but we haven't implemented them) return null; } private static function getAuthPassword() : ?string { global $server; return (isset($server['PHP_AUTH_PW'])) ? $server['PHP_AUTH_PW'] : null; } }