X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fcontacts.php;h=388bf08e6389499de19974567dd7808772b7f32f;hb=43110db749850e49d309ad8b3e72266bd373a2a8;hp=7a97b53d230a33e02647dc836c923534f9b513c2;hpb=e6aaa8b59b138f4195fb7f1e93b9b14980c309c3;p=friendica.git diff --git a/mod/contacts.php b/mod/contacts.php index 7a97b53d23..388bf08e63 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -3,13 +3,26 @@ require_once('include/Contact.php'); function contacts_init(&$a) { + if(! local_user()) + return; + require_once('include/group.php'); if(! x($a->page,'aside')) $a->page['aside'] = ''; $a->page['aside'] .= group_side(); - if($a->config['register_policy'] != REGISTER_CLOSED) - $a->page['aside'] .= ''; + $inv = ''; + + if(get_config('system','invitations_only')) { + $x = get_pconfig(local_user(),'system','invites_remaining'); + if($x || is_site_admin()) { + $a->page['aside'] .= '' . $inv; + } + } + elseif($a->config['register_policy'] != REGISTER_CLOSED) + $a->page['aside'] .= $inv; $a->page['aside'] .= '