summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-06-30 16:10:12 -0700
committerZach Copley <zach@controlyourself.ca>2009-06-30 16:10:12 -0700
commitb10dba27982a94d73fb7f8d70cae611241871706 (patch)
treefb99c85c9db49a53f49e71617aaad795fec700f2 /actions
parent190d45cd05a1affbc8d0db50a487b5081f6a34cb (diff)
parent925b3f32eae5c6528bfe332317092f08aabc6508 (diff)
Merge commit 'jeff-themovie/invite-enabled' into 0.8.x
* commit 'jeff-themovie/invite-enabled': Adds $config['invite']['enabled'] to enable/disable invites.
Diffstat (limited to 'actions')
-rw-r--r--actions/invite.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/actions/invite.php b/actions/invite.php
index 5dcc83652..bdea4807d 100644
--- a/actions/invite.php
+++ b/actions/invite.php
@@ -35,7 +35,9 @@ class InviteAction extends CurrentUserDesignAction
function handle($args)
{
parent::handle($args);
- if (!common_logged_in()) {
+ if (!common_config('invite', 'enabled')) {
+ $this->clientError(_('Invites have been disabled.'));
+ } else if (!common_logged_in()) {
$this->clientError(sprintf(_('You must be logged in to invite other users to use %s'),
common_config('site', 'name')));
return;