diff options
author | redmatrix <git@macgirvin.com> | 2016-01-29 14:07:10 -0800 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-01-29 14:07:10 -0800 |
commit | 08aeeadd7157d48fa3f4aff0cc2b58a314e508d2 (patch) | |
tree | 1104ac6afeea6efe7ca8acd475618e0546d43971 /include/identity.php | |
parent | c214692f661488df30eaf00ca85da94a5ecc1e14 (diff) | |
download | volse-hubzilla-08aeeadd7157d48fa3f4aff0cc2b58a314e508d2.tar.gz volse-hubzilla-08aeeadd7157d48fa3f4aff0cc2b58a314e508d2.tar.bz2 volse-hubzilla-08aeeadd7157d48fa3f4aff0cc2b58a314e508d2.zip |
move permission check before global block check
Diffstat (limited to 'include/identity.php')
-rw-r--r-- | include/identity.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/identity.php b/include/identity.php index fd0b4d7f5..e1e79394a 100644 --- a/include/identity.php +++ b/include/identity.php @@ -924,6 +924,10 @@ function profile_sidebar($profile, $block = 0, $show_connect = true) { $pdesc = true; $reddress = true; + if(! perm_is_allowed($profile['uid'],((is_array($observer)) ? $observer['xchan_hash'] : ''),'view_profile')) { + $block = true; + } + if($block && intval(get_config('system','block_public_blackout'))) return $o; @@ -1012,9 +1016,6 @@ function profile_sidebar($profile, $block = 0, $show_connect = true) { // logger('online: ' . $profile['online']); - if(! perm_is_allowed($profile['uid'],((is_array($observer)) ? $observer['xchan_hash'] : ''),'view_profile')) { - $block = true; - } if(($profile['hidewall'] && (! local_channel()) && (! remote_channel())) || $block ) { $location = $reddress = $pdesc = $gender = $marital = $homepage = False; |