]> git.mxchange.org Git - friendica.git/blobdiff - mod/openid.php
Uncommon logger levels in Friendica (#5453)
[friendica.git] / mod / openid.php
index 5af209c13e072fb838358e8e4cd0dccb1e0d1686..3baeec28d04feab6ed8d06ff1439b7e38131121b 100644 (file)
@@ -2,14 +2,13 @@
 /**
  * @file mod/openid.php
  */
+
 use Friendica\App;
 use Friendica\Core\Config;
 use Friendica\Core\L10n;
 use Friendica\Core\System;
 use Friendica\Database\DBM;
 
-require_once('library/openid.php');
-
 function openid_content(App $a) {
 
        $noid = Config::get('system','no_openid');
@@ -20,7 +19,7 @@ function openid_content(App $a) {
 
        if((x($_GET,'openid_mode')) && (x($_SESSION,'openid'))) {
 
-               $openid = new LightOpenID;
+               $openid = new LightOpenID($a->get_hostname());
 
                if($openid->validate()) {
 
@@ -63,7 +62,7 @@ function openid_content(App $a) {
                        // Successful OpenID login - but we can't match it to an existing account.
                        // New registration?
 
-                       if ($a->config['register_policy'] == REGISTER_CLOSED) {
+                       if (intval(Config::get('config', 'register_policy')) === REGISTER_CLOSED) {
                                notice(L10n::t('Account not found and OpenID registration is not permitted on this site.') . EOL);
                                goaway(System::baseUrl());
                        }