]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fixed incorrect disabling of login_token.
authorCraig Andrews <candrews@integralblue.com>
Thu, 10 Dec 2009 18:22:46 +0000 (13:22 -0500)
committerCraig Andrews <candrews@integralblue.com>
Thu, 10 Dec 2009 18:22:46 +0000 (13:22 -0500)
actions/login.php
lib/command.php

index a6f86c0ca1714b481da40f60de01649811ba1288..c775fa6924e2372ae7e99114c90d7f055c180cc3 100644 (file)
@@ -77,12 +77,13 @@ class LoginAction extends Action
         parent::handle($args);
 
         $disabled = common_config('logincommand','disabled');
+        $disabled = isset($disabled) && $disabled;
 
         if (common_is_real_login()) {
             $this->clientError(_('Already logged in.'));
         } else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
             $this->checkLogin();
-        } else if (!isset($disabled) && isset($args['user_id']) && isset($args['token'])){
+        } else if (!$disabled && isset($args['user_id']) && isset($args['token'])){
             $this->checkLogin($args['user_id'],$args['token']);
         } else {
             common_ensure_session();
index af8855a7f2bc55b669ebae2d40372a4f35baf071..450db9da37372968e8572e648749178c0cc97e84 100644 (file)
@@ -584,7 +584,8 @@ class LoginCommand extends Command
     function execute($channel)
     {
         $disabled = common_config('logincommand','disabled');
-        if(isset($disabled) && $disabled) {
+        $disabled = isset($disabled) && $disabled;
+        if($disabled) {
             $channel->error($this->user, _('Login command is disabled'));
             return;
         }