summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-12-05 21:04:20 -0500
committerCraig Andrews <candrews@integralblue.com>2009-12-05 21:05:33 -0500
commit3b14b61fa745d4906796ac49e78ae712f61e9643 (patch)
tree7058e787308bb3b8324e3cb55d8e1a91bf5ee7ba /lib
parent75cac0fd6b94f77ec8ff32ebc89ec513ee102831 (diff)
Add a configuration option to disable the login command.
$config['logincommand']['disabled'] = true; This commit should be reverted once the command has been sufficiently tested and trusted.
Diffstat (limited to 'lib')
-rw-r--r--lib/command.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/command.php b/lib/command.php
index 7e98156b6..e2a665511 100644
--- a/lib/command.php
+++ b/lib/command.php
@@ -583,6 +583,11 @@ class LoginCommand extends Command
{
function execute($channel)
{
+ $disabled = common_config('logincommand','disabled');
+ if(isset($disabled)) {
+ $channel->error($this->user, _('Login command is disabled'));
+ return;
+ }
$login_token = Login_token::staticGet('user_id',$this->user->id);
if($login_token){
$login_token->delete();