diff --git a/mod/profile.php b/mod/profile.php
index de1e272489..e9d4ca344e 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -32,6 +32,8 @@ function profile_init(&$a) {
profile_load($a,$which,$profile);
+ $userblock = (($a->profile['hidewall'] && (! local_user()) && (! remote_user())) ? true : false);
+
if((x($a->profile,'page-flags')) && ($a->profile['page-flags'] == PAGE_COMMUNITY)) {
$a->page['htmlhead'] .= '';
}
@@ -41,8 +43,8 @@ function profile_init(&$a) {
$delegate = ((strstr($a->profile['openid'],'://')) ? $a->profile['openid'] : 'http://' . $a->profile['openid']);
$a->page['htmlhead'] .= '' . "\r\n";
}
-
- if(! $blocked) {
+ // site block
+ if((! $blocked) && (! $userblock)) {
$keywords = ((x($a->profile,'pub_keywords')) ? $a->profile['pub_keywords'] : '');
$keywords = str_replace(array('#',',',' ',',,'),array('',' ',',',','),$keywords);
if(strlen($keywords))