Renamed function, beginning to replace the "remote_user" function
This commit is contained in:
parent
1ddd2df4b8
commit
6e9026e033
7 changed files with 29 additions and 54 deletions
9
boot.php
9
boot.php
|
@ -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']);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue