]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/invite.php
gc inboxes on a regular basis
[quix0rs-gnu-social.git] / actions / invite.php
index c793f582491035d752ae1b696f4a2bed8764ebd5..bdea4807d8a2f2ac0f7f8c1043d35c6d56d6595d 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, Controlez-Vous, Inc.
+ * Copyright (C) 2008, 2009, Control Yourself, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
@@ -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;