block_public should also block the contacts page and 'Connect' page if not logged in
This commit is contained in:
parent
eeb3c13ad3
commit
639d52ec18
2 changed files with 19 additions and 1 deletions
|
@ -12,6 +12,10 @@
|
||||||
if(! function_exists('dfrn_request_init')) {
|
if(! function_exists('dfrn_request_init')) {
|
||||||
function dfrn_request_init(&$a) {
|
function dfrn_request_init(&$a) {
|
||||||
|
|
||||||
|
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if($a->argc > 1)
|
if($a->argc > 1)
|
||||||
$which = $a->argv[1];
|
$which = $a->argv[1];
|
||||||
|
|
||||||
|
@ -583,6 +587,12 @@ function dfrn_request_content(&$a) {
|
||||||
* Normal web request. Display our user's introduction form.
|
* 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
|
* Try to auto-fill the profile address
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,13 +2,21 @@
|
||||||
|
|
||||||
function viewcontacts_init(&$a) {
|
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) {
|
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']))) {
|
if(((! count($a->profile)) || ($a->profile['hide-friends']))) {
|
||||||
notice( t('Permission denied.') . EOL);
|
notice( t('Permission denied.') . EOL);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue