]> git.mxchange.org Git - friendica.git/blobdiff - mod/openid.php
adding desaturation and transition for forumlist widget
[friendica.git] / mod / openid.php
index 4e247b384fe254f26869a5f54354a0536f9104c9..def34ff08f35937ef26cdcef6b0b4f0639cd302b 100644 (file)
@@ -4,11 +4,10 @@
  */
 
 use Friendica\App;
-use Friendica\Core\Authentication;
 use Friendica\Core\Config;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
-use Friendica\Core\System;
+use Friendica\Core\Session;
 use Friendica\Database\DBA;
 use Friendica\Util\Strings;
 
@@ -53,7 +52,7 @@ function openid_content(App $a) {
 
                                unset($_SESSION['openid']);
 
-                               Authentication::setAuthenticatedSessionForUser($r[0],true,true);
+                               Session::setAuthenticatedForUser($a, $r[0],true,true);
 
                                // just in case there was no return url set
                                // and we fell through
@@ -64,7 +63,7 @@ function openid_content(App $a) {
                        // Successful OpenID login - but we can't match it to an existing account.
                        // New registration?
 
-                       if (intval(Config::get('config', 'register_policy')) === REGISTER_CLOSED) {
+                       if (intval(Config::get('config', 'register_policy')) === \Friendica\Module\Register::CLOSED) {
                                notice(L10n::t('Account not found and OpenID registration is not permitted on this site.') . EOL);
                                $a->internalRedirect();
                        }
@@ -94,17 +93,17 @@ function openid_content(App $a) {
                                        }
                                }
                        }
-                       if ($nick) {
+                       if (!empty($nick)) {
                                $args .= '&nickname=' . urlencode($nick);
                        }
-                       elseif ($first) {
+                       elseif (!empty($first)) {
                                $args .= '&nickname=' . urlencode($first);
                        }
 
-                       if ($photosq) {
+                       if (!empty($photosq)) {
                                $args .= '&photo=' . urlencode($photosq);
                        }
-                       elseif ($photo) {
+                       elseif (!empty($photo)) {
                                $args .= '&photo=' . urlencode($photo);
                        }