function __construct($id = 'login_form', $method = 'post', $attributes = null, $trackSubmit = false) { parent::__construct($id, $method, $attributes, $trackSubmit); }
/** * Saves password reset info and sends confirmation email. * * @param QuickForm2 $form * @return array Error message(s) if an error occurs. */ protected function resetPasswordFirstStep($form) { $loginMail = $form->getSubmitValue('form_login'); $password = $form->getSubmitValue('form_password'); try { $this->passwordResetter->initiatePasswordResetProcess($loginMail, $password); } catch (Exception $ex) { Log::debug($ex); return array($ex->getMessage()); } return null; }
function __construct($id = 'generalsetupform', $method = 'post', $attributes = null, $trackSubmit = false) { parent::__construct($id, $method, $attributes = array('autocomplete' => 'off'), $trackSubmit); }
/** * Add form to view * * @param QuickForm2 $form * @ignore */ public function addForm(QuickForm2 $form) { // assign array with form data $this->assign('form_data', $form->getFormData()); $this->assign('element_list', $form->getElementList()); }
/** * Saves password reset info and sends confirmation email. * * @param QuickForm2 $form * @return array Error message(s) if an error occurs. */ private function resetPasswordFirstStep($form) { $loginMail = $form->getSubmitValue('form_login'); $password = $form->getSubmitValue('form_password'); // check the password try { UsersManager::checkPassword($password); } catch (Exception $ex) { return array($ex->getMessage()); } // get the user's login if ($loginMail === 'anonymous') { return array(Piwik::translate('Login_InvalidUsernameEmail')); } $user = self::getUserInformation($loginMail); if ($user === null) { return array(Piwik::translate('Login_InvalidUsernameEmail')); } $login = $user['login']; // if valid, store password information in options table, then... Login::savePasswordResetInfo($login, $password); // ... send email with confirmation link try { $this->sendEmailConfirmationLink($user); } catch (Exception $ex) { // remove password reset info Login::removePasswordResetInfo($login); return array($ex->getMessage() . Piwik::translate('Login_ContactAdmin')); } return null; }
public function __construct($id = 'defaultsettingsform', $method = 'post', $attributes = null, $trackSubmit = false) { parent::__construct($id, $method, $attributes, $trackSubmit); }