+ // Otherwise it's probably an openid.
+ try {
+ $openid = new LightOpenID($a->getHostName());
+ $openid->identity = $openid_url;
+ $_SESSION['openid'] = $openid_url;
+ $_SESSION['remember'] = $remember;
+ $openid->returnUrl = $a->getBaseURL(true) . '/openid';
+ System::externalRedirect($openid->authUrl());
+ } catch (Exception $e) {
+ notice(L10n::t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.') . '<br /><br >' . L10n::t('The error message was:') . ' ' . $e->getMessage());
+ }
+ }
+
+ /**
+ * Attempts to authenticate using login/password
+ *
+ * @param string $username User name
+ * @param string $password Clear password
+ * @param bool $remember Whether to set the session remember flag
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ */
+ private static function passwordAuthentication($username, $password, $remember)
+ {
+ $record = null;