From: Friendika Date: Fri, 22 Apr 2011 02:12:22 +0000 (-0700) Subject: block_public should also block the contacts page and 'Connect' page if not logged in X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=639d52ec181e2c481a8f7697f93278c84a78ec7e;p=friendica.git block_public should also block the contacts page and 'Connect' page if not logged in --- diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index 4463c713f9..1af0dc85dd 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -12,6 +12,10 @@ if(! function_exists('dfrn_request_init')) { function dfrn_request_init(&$a) { + if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { + return; + } + if($a->argc > 1) $which = $a->argv[1]; @@ -583,6 +587,12 @@ function dfrn_request_content(&$a) { * Normal web request. Display our user's introduction form. */ + if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { + notice( t('Public access denied.') . EOL); + return; + } + + /** * Try to auto-fill the profile address */ diff --git a/mod/viewcontacts.php b/mod/viewcontacts.php index 063637bf9e..c970db33aa 100644 --- a/mod/viewcontacts.php +++ b/mod/viewcontacts.php @@ -2,13 +2,21 @@ function viewcontacts_init(&$a) { - profile_load($a,$a->argv[1]); + if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { + return; + } + profile_load($a,$a->argv[1]); } function viewcontacts_content(&$a) { + if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { + notice( t('Public access denied.') . EOL); + return; + } + if(((! count($a->profile)) || ($a->profile['hide-friends']))) { notice( t('Permission denied.') . EOL); return;