. * */ namespace Friendica\Core\Session\Capability; /** * Handles user infos based on session infos */ interface IHandleUserSessions { /** * Returns the user id of locally logged-in user or false. * * @return int|bool user id or false */ public function getLocalUserId(); /** * Returns the public contact id of logged-in user or false. * * @return int|bool public contact id or false */ public function getPublicContactId(); /** * Returns public contact id of authenticated site visitor or false * * @return int|bool visitor_id or false */ public function getRemoteUserId(); /** * Return the user contact ID of a visitor for the given user ID they are visiting * * @param int $uid User ID * * @return int */ public function getRemoteContactID(int $uid): int; /** * Returns User ID for given contact ID of the visitor * * @param int $cid Contact ID * * @return int User ID for given contact ID of the visitor */ public function getUserIDForVisitorContactID(int $cid): int; /** * Returns if the current visitor is authenticated * * @return bool "true" when visitor is either a local or remote user */ public function isAuthenticated(): bool; /** * Set the session variable that contains the contact IDs for the visitor's contact URL * * @param string $url Contact URL */ public function setVisitorsContacts(); }