Fixed incorrect disabling of login_token.
This commit is contained in:
parent
b07e1143cc
commit
b36ec6da87
|
@ -77,12 +77,13 @@ class LoginAction extends Action
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
|
|
||||||
$disabled = common_config('logincommand','disabled');
|
$disabled = common_config('logincommand','disabled');
|
||||||
|
$disabled = isset($disabled) && $disabled;
|
||||||
|
|
||||||
if (common_is_real_login()) {
|
if (common_is_real_login()) {
|
||||||
$this->clientError(_('Already logged in.'));
|
$this->clientError(_('Already logged in.'));
|
||||||
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
$this->checkLogin();
|
$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']);
|
$this->checkLogin($args['user_id'],$args['token']);
|
||||||
} else {
|
} else {
|
||||||
common_ensure_session();
|
common_ensure_session();
|
||||||
|
|
|
@ -584,7 +584,8 @@ class LoginCommand extends Command
|
||||||
function execute($channel)
|
function execute($channel)
|
||||||
{
|
{
|
||||||
$disabled = common_config('logincommand','disabled');
|
$disabled = common_config('logincommand','disabled');
|
||||||
if(isset($disabled) && $disabled) {
|
$disabled = isset($disabled) && $disabled;
|
||||||
|
if($disabled) {
|
||||||
$channel->error($this->user, _('Login command is disabled'));
|
$channel->error($this->user, _('Login command is disabled'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user