public function __construct($_variables) { parent::__construct(); $_SESSION['errormessage'] = 'undefined'; $this->loadClassVariables($_variables); try { // and login // -- check for failed attempts in memcache // if ($this->__config->get('blockFailedAttempts')) { $_attempts = $this->getLogCounter($this->applicationName() . md5($_SERVER['REMOTE_ADDR'])); if ($_attempts > 3) { throw new \Exception($this->__t->__('Access disabled due to multiple failed login attempts.')); } } // get user data and validate login if ($this->getUser()) { $this->validateUserLogin(); } else { $this->set('output', $this->__t->__('Invalid Login.')); $this->set('errormessage', $this->__t->__('Invalid Login')); if ($this->__config->get('blockFailedAttempts')) { if ($this->incLogCounter($this->applicationName() . md5($_SERVER['REMOTE_ADDR'])) > 3) { $this->set('errormessage', $this->__t->__('Too many failed attempts - access disabled.')); } } $this->set('success', false); } } catch (\Exception $e) { throw new \Exception('Could not login - ' . $e); } }
public function __construct($_variables) { parent::__construct(); $_SESSION['errormessage'] = 'undefined'; $this->loadClassVariables($_variables); $this->passwordChange(); }