diff --git a/functions/classes/class.Common.php b/functions/classes/class.Common.php index b3471be2aa299c0c35d3fdfdf35ee555c0bf1787..6eac70824d08b5e52858129d4f953ad676d243ea 100644 --- a/functions/classes/class.Common.php +++ b/functions/classes/class.Common.php @@ -36,6 +36,12 @@ class Common_functions { */ public $json_error = false; + /** + * Composer error flag + * @var bool + */ + public $composer_err = false; + /** * Default font * @@ -2324,7 +2330,7 @@ class Common_functions { } } // check - if (isset($this->composer_err)) { + if ($this->composer_err!==false) { return true; } } diff --git a/functions/classes/class.User.php b/functions/classes/class.User.php index 9b9fd30916a04e7a8b31d45335af09f96258faf4..b3f3b7df84581bf84f17850b2d1a766194e56b29 100644 --- a/functions/classes/class.User.php +++ b/functions/classes/class.User.php @@ -824,10 +824,6 @@ class User extends Common_functions { $this->Log->write ( _("User login"), _('Error: Invalid authentication method'), 2 ); $this->Result->show("danger", _("Error: Invalid authentication method"), true); } - # disabled - we made separate check on this, therwise we reveal info before user is authenticated - // elseif ($this->user->disabled=="Yes") { - // $this->Result->show("danger", _("Your account has been disabled").".", true); - // } else { # set method name variable $authmethodtype = $this->authmethodtype; @@ -926,20 +922,14 @@ class User extends Common_functions { * @return void */ private function get_auth_method_type () { - # for older versions - only local is available! - if($this->settings->version=="1.1") { - $this->authmethodtype = "auth_local"; + try { $method = $this->Database->getObject("usersAuthMethod", $this->authmethodid); } + catch (Exception $e) { + $this->Result->show("danger", _("Error: ").$e->getMessage(), true); } - else { - try { $method = $this->Database->getObject("usersAuthMethod", $this->authmethodid); } - catch (Exception $e) { - $this->Result->show("danger", _("Error: ").$e->getMessage(), true); - } - # save method name if existing - if($method!==false) { - $this->authmethodtype = "auth_".$method->type; - $this->authmethodparams = $method->params; - } + # save method name if existing + if($method!==false) { + $this->authmethodtype = "auth_".$method->type; + $this->authmethodparams = $method->params; } }