2010-07-01 23:48:07 +00:00
|
|
|
<?php
|
2018-02-04 23:44:42 +00:00
|
|
|
/**
|
2022-01-02 07:27:47 +00:00
|
|
|
* @copyright Copyright (C) 2010-2022, the Friendica project
|
2020-02-09 15:18:46 +00:00
|
|
|
*
|
|
|
|
* @license GNU AGPL version 3 or any later version
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2016-04-03 11:48:31 +00:00
|
|
|
*
|
2015-12-24 00:31:17 +00:00
|
|
|
* Friendica is a communications platform for integrated social communications
|
|
|
|
* utilising decentralised communications and linkage to several indie social
|
|
|
|
* projects - as well as popular mainstream providers.
|
2016-04-03 11:48:31 +00:00
|
|
|
*
|
2015-12-24 00:31:17 +00:00
|
|
|
* Our mission is to free our friends and families from the clutches of
|
|
|
|
* data-harvesting corporations, and pave the way to a future where social
|
|
|
|
* communications are free and open and flow between alternate providers as
|
|
|
|
* easily as email does today.
|
|
|
|
*/
|
2010-07-01 23:48:07 +00:00
|
|
|
|
2022-10-17 21:11:00 +00:00
|
|
|
use Friendica\Core\Session;
|
2021-11-04 20:29:59 +00:00
|
|
|
|
2015-12-24 00:31:17 +00:00
|
|
|
/**
|
2020-01-19 06:05:23 +00:00
|
|
|
* Returns the user id of locally logged in user or false.
|
2016-10-02 03:29:30 +00:00
|
|
|
*
|
2015-12-24 00:31:17 +00:00
|
|
|
* @return int|bool user id or false
|
2022-10-18 05:57:59 +00:00
|
|
|
* @deprecated since version 2022.12, use Core\Session::getLocalUser() instead
|
2015-12-24 00:31:17 +00:00
|
|
|
*/
|
2017-11-09 16:05:18 +00:00
|
|
|
function local_user()
|
|
|
|
{
|
2022-10-17 21:11:00 +00:00
|
|
|
return Session::getLocalUser();
|
2012-04-09 12:04:49 +00:00
|
|
|
}
|
2010-07-01 23:48:07 +00:00
|
|
|
|
2017-03-06 10:06:05 +00:00
|
|
|
/**
|
2020-01-19 06:05:23 +00:00
|
|
|
* Returns the public contact id of logged in user or false.
|
2017-03-06 10:06:05 +00:00
|
|
|
*
|
|
|
|
* @return int|bool public contact id or false
|
2022-10-18 05:57:59 +00:00
|
|
|
* @deprecated since version 2022.12, use Core\Session:: getPublicContact() instead
|
2017-03-06 10:06:05 +00:00
|
|
|
*/
|
2017-11-09 16:05:18 +00:00
|
|
|
function public_contact()
|
|
|
|
{
|
2022-10-17 21:11:00 +00:00
|
|
|
return Session::getPublicContact();
|
2017-03-06 10:06:05 +00:00
|
|
|
}
|
|
|
|
|
2015-12-24 00:31:17 +00:00
|
|
|
/**
|
2020-08-05 02:44:42 +00:00
|
|
|
* Returns public contact id of authenticated site visitor or false
|
2016-10-02 03:29:30 +00:00
|
|
|
*
|
2015-12-24 00:31:17 +00:00
|
|
|
* @return int|bool visitor_id or false
|
2022-10-18 05:57:59 +00:00
|
|
|
* @deprecated since version 2022.12, use Core\Session:: getRemoteUser() instead
|
2015-12-24 00:31:17 +00:00
|
|
|
*/
|
2019-09-28 09:59:08 +00:00
|
|
|
function remote_user()
|
2017-11-09 16:05:18 +00:00
|
|
|
{
|
2022-10-17 21:11:00 +00:00
|
|
|
return Session::getRemoteUser();
|
2015-12-24 00:31:17 +00:00
|
|
|
}
|