aboutsummaryrefslogtreecommitdiffstats
path: root/mod/invite.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-29 00:28:23 -0800
committerfriendica <info@friendica.com>2015-01-29 00:28:23 -0800
commitfd0b6c967fce4d8a82e9dad121ae7d8301d3f342 (patch)
tree5c37812ef7baeadc17fce088c4394d25f75b593c /mod/invite.php
parentc993ddd86ee25832e35e65333fa25b396e7aefdf (diff)
parent872b165eb2bb5d632a12f2d7e1a28e195c2d5348 (diff)
downloadvolse-hubzilla-fd0b6c967fce4d8a82e9dad121ae7d8301d3f342.tar.gz
volse-hubzilla-fd0b6c967fce4d8a82e9dad121ae7d8301d3f342.tar.bz2
volse-hubzilla-fd0b6c967fce4d8a82e9dad121ae7d8301d3f342.zip
Merge branch 'master' into pocorate
Diffstat (limited to 'mod/invite.php')
-rw-r--r--mod/invite.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/mod/invite.php b/mod/invite.php
index 12080c4d9..e197278d1 100644
--- a/mod/invite.php
+++ b/mod/invite.php
@@ -9,7 +9,7 @@
function invite_post(&$a) {
- if(! local_user()) {
+ if(! local_channel()) {
notice( t('Permission denied.') . EOL);
return;
}
@@ -20,7 +20,7 @@ function invite_post(&$a) {
if(! $max_invites)
$max_invites = 50;
- $current_invites = intval(get_pconfig(local_user(),'system','sent_invites'));
+ $current_invites = intval(get_pconfig(local_channel(),'system','sent_invites'));
if($current_invites > $max_invites) {
notice( t('Total invitation limit exceeded.') . EOL);
return;
@@ -34,7 +34,7 @@ function invite_post(&$a) {
if(get_config('system','invitation_only')) {
$invonly = true;
- $x = get_pconfig(local_user(),'system','invites_remaining');
+ $x = get_pconfig(local_channel(),'system','invites_remaining');
if((! $x) && (! is_site_admin()))
return;
}
@@ -62,7 +62,7 @@ function invite_post(&$a) {
if(! is_site_admin()) {
$x --;
if($x >= 0)
- set_pconfig(local_user(),'system','invites_remaining',$x);
+ set_pconfig(local_channel(),'system','invites_remaining',$x);
else
return;
}
@@ -82,7 +82,7 @@ function invite_post(&$a) {
if($res) {
$total ++;
$current_invites ++;
- set_pconfig(local_user(),'system','sent_invites',$current_invites);
+ set_pconfig(local_channel(),'system','sent_invites',$current_invites);
if($current_invites > $max_invites) {
notice( t('Invitation limit exceeded. Please contact your site administrator.') . EOL);
return;
@@ -100,7 +100,7 @@ function invite_post(&$a) {
function invite_content(&$a) {
- if(! local_user()) {
+ if(! local_channel()) {
notice( t('Permission denied.') . EOL);
return;
}
@@ -110,7 +110,7 @@ function invite_content(&$a) {
if(get_config('system','invitation_only')) {
$invonly = true;
- $x = get_pconfig(local_user(),'system','invites_remaining');
+ $x = get_pconfig(local_channel(),'system','invites_remaining');
if((! $x) && (! is_site_admin())) {
notice( t('You have no more invitations available') . EOL);
return '';