diff options
author | redmatrix <git@macgirvin.com> | 2016-01-24 13:53:18 -0800 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-01-24 13:53:18 -0800 |
commit | 0db2fe6e39cca8eda1d2f53b3715a67e1bce4c5c (patch) | |
tree | 43a591919bca147bb214d3ad6e650ee7467bcc8e /mod | |
parent | ae6ae881519446f1ce750e678b5871a5e3866d0e (diff) | |
download | volse-hubzilla-0db2fe6e39cca8eda1d2f53b3715a67e1bce4c5c.tar.gz volse-hubzilla-0db2fe6e39cca8eda1d2f53b3715a67e1bce4c5c.tar.bz2 volse-hubzilla-0db2fe6e39cca8eda1d2f53b3715a67e1bce4c5c.zip |
remote delegation issue when already logged in with different account on same site.
Diffstat (limited to 'mod')
-rw-r--r-- | mod/magic.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mod/magic.php b/mod/magic.php index 2fee87241..12679773b 100644 --- a/mod/magic.php +++ b/mod/magic.php @@ -105,6 +105,7 @@ function magic_init(&$a) { $r = q("select * from channel left join hubloc on channel_hash = hubloc_hash where hubloc_addr = '%s' limit 1", dbesc($delegate) ); + if($r && intval($r[0]['channel_id'])) { $allowed = perm_is_allowed($r[0]['channel_id'],get_observer_hash(),'delegate'); if($allowed) { @@ -112,6 +113,7 @@ function magic_init(&$a) { $_SESSION['delegate'] = get_observer_hash(); $_SESSION['account_id'] = intval($r[0]['channel_account_id']); change_channel($r[0]['channel_id']); + $delegation_success = true; } } |