protected function _processInput($postData) { $users = Kwf_Registry::get('userModel'); $showPassword = false; //is there a password auth? foreach ($users->getAuthMethods() as $auth) { if ($auth instanceof Kwf_User_Auth_Interface_Password) { $showPassword = true; } } if (!$showPassword) { throw new Kwf_Exception("No password auth method found"); } //if a redirect auth doesn't allow password hide it foreach ($users->getAuthMethods() as $auth) { if ($auth instanceof Kwf_User_Auth_Interface_Redirect) { if (!$auth->allowPasswordForUser($users->getAuthedUser())) { $label = $auth->getLoginRedirectLabel(); $label = Kwf_Trl::getInstance()->trlStaticExecute($label['name']); $msg = $this->getData()->trlKwf("This user doesn't have a password, he must log in using {0}", $label); $this->_errors[] = array('messages' => array($msg)); break; } } } parent::_processInput($postData); }
protected function _processInput($postData) { $postData[$this->getData()->componentId . '-post'] = true; //force processInput to be called (required for createUserRow call) parent::_processInput($postData); }