contact_block() not being shown to unauthenticated visitors - even if perms allow. Also separate the permissions logic for this function so that we can have a mini-profile widget and a separate contact_block widget instead of always lumping them together. We probably also should move contact_block() outside of include/text.php as it doesn't really belong there. Just not sure where it belongs - perhaps contact_widgets wouold be a good place.
This commit is contained in:
@@ -656,6 +656,12 @@ function contact_block() {
|
||||
$o = '';
|
||||
$a = get_app();
|
||||
|
||||
if(! $a->profile['uid'])
|
||||
return;
|
||||
|
||||
if(! perm_is_allowed($a->profile['uid'],get_observer_hash(),'view_contacts'))
|
||||
return;
|
||||
|
||||
$shown = get_pconfig($a->profile['uid'],'system','display_friend_count');
|
||||
|
||||
if($shown === false)
|
||||
|
||||
Reference in New Issue
Block a user