<?php
/**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
use Friendica\Core\Session\Capability\IHandleSessions;
use Friendica\Core\Session\Capability\IHandleUserSessions;
use Friendica\Model\Contact;
+use Friendica\Model\User;
/**
* This class handles user sessions, which is directly extended from regular session
return false;
}
+ /** {@inheritDoc} */
+ public function getLocalUserNickname()
+ {
+ if ($this->isAuthenticated()) {
+ return $this->session->get('nickname');
+ }
+
+ return false;
+ }
+
/** {@inheritDoc} */
public function getPublicContactId()
{
return $this->session->get('authenticated', false);
}
+ /** {@inheritDoc} */
+ public function isSiteAdmin(): bool
+ {
+ return User::isSiteAdmin($this->getLocalUserId());
+ }
+
/** {@inheritDoc} */
public function setVisitorsContacts()
{