X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FSession.php;h=e54c0e49b910f413b67e3190f1f17991a25f1499;hb=f70271aa5d40ce48ec92f1c6ec652c6a977e588c;hp=e3768cbef135834f3a5c1187fd5a121e60511316;hpb=e077f30d51659f8da1df72e64c9978d21ba350c3;p=friendica.git diff --git a/src/Core/Session.php b/src/Core/Session.php index e3768cbef1..e54c0e49b9 100644 --- a/src/Core/Session.php +++ b/src/Core/Session.php @@ -62,13 +62,7 @@ class Session */ public static function get($name, $defaults = null) { - if (isset($_SESSION)) { - $return = defaults($_SESSION, $name, $defaults); - } else { - $return = $defaults; - } - - return $return; + return $_SESSION[$name] ?? $defaults; } /** @@ -155,7 +149,7 @@ class Session $a->getLogger()->info('auth_identities refresh: ' . print_r($a->identities, true)); } - $contact = Contact::select([], ['uid' => $user_record['uid'], 'self' => true]); + $contact = DBA::selectFirst('contact', [], ['uid' => $user_record['uid'], 'self' => true]); if (DBA::isResult($contact)) { $a->contact = $contact; $a->cid = $contact['id'];