remote_user can now support multiple contacts being logged in at once
This commit is contained in:
parent
a9deda1e5e
commit
4cd8233f61
13 changed files with 226 additions and 73 deletions
|
@ -35,8 +35,18 @@ function display_content(&$a) {
|
|||
$contact = null;
|
||||
$remote_contact = false;
|
||||
|
||||
if(remote_user()) {
|
||||
$contact_id = $_SESSION['visitor_id'];
|
||||
$contact_id = 0;
|
||||
|
||||
if(is_array($_SESSION['remote'])) {
|
||||
foreach($_SESSION['remote'] as $v) {
|
||||
if($v['uid'] == $a->profile['uid']) {
|
||||
$contact_id = $v['cid'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($contact_id) {
|
||||
$groups = init_groups_visitor($contact_id);
|
||||
$r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
||||
intval($contact_id),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue