1
1
Fork 0

Renamed function, beginning to replace the "remote_user" function

This commit is contained in:
Michael 2019-09-28 09:36:41 +00:00
commit 6e9026e033
7 changed files with 29 additions and 54 deletions

View file

@ -416,19 +416,12 @@ function public_contact()
*/
function remote_user($uid = null)
{
// You cannot be both local and remote.
// Unncommented by rabuzarus because remote authentication to local
// profiles wasn't possible anymore (2018-04-12).
// if (local_user()) {
// return false;
// }
if (empty($_SESSION['authenticated'])) {
return false;
}
if (!is_null($uid)) {
return Session::getVisitorContactIDForUserID($uid);
return Session::getRemoteContactID($uid);
} elseif (is_null($uid) && !empty($_SESSION['visitor_id'])) {
return intval($_SESSION['visitor_id']);
}