diff options
-rw-r--r-- | application/config/config.php | 3 | ||||
-rw-r--r-- | application/controllers/user.php | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/application/config/config.php b/application/config/config.php index 633d37f26..9fe49d15f 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -398,6 +398,9 @@ $config['tarball_max_size'] = 1024*1024*50; // 50MiB // Changing this is not recommended $config['tarball_cache_time'] = 60*5; // 5 minutes +// The maximum number of active invitation keys per account. +$config['max_invitation_keys'] = 3; //3 keys + // Possible values: // - apc: needs the apc module and is only useful on long running php processes diff --git a/application/controllers/user.php b/application/controllers/user.php index 33d0efb6b..1e0416c73 100644 --- a/application/controllers/user.php +++ b/application/controllers/user.php @@ -135,7 +135,7 @@ class User extends MY_Controller { ->where('action', 'invitation') ->count_all_results(); - if ($invitations + 1 > 3) { + if ($invitations + 1 > $this->config->item('max_invitation_keys')) { throw new \exceptions\PublicApiException("user/invitation-limit", "You can't create more invitation keys at this time."); } |