Beispiel #1
0
 public function validate_password(Module_PasswordForgot $module, $password)
 {
     if (!GWF_Validator::isValidPassword($password)) {
         return $this->module->lang('err_weak_pass', array(8));
     } elseif (Common::getPost('password2', '') !== $password) {
         return $this->module->lang('err_pass_retype');
     } else {
         return false;
     }
 }
Beispiel #2
0
 /**
  * Add admin
  */
 public static function wizard_9_1()
 {
     $username = Common::getPostString('username', '');
     if (!GWF_Validator::isValidUsername($username)) {
         return GWF_HTML::error('Install Wizard', 'Invalid username.', false) . self::wizard_8();
     }
     $password = Common::getPostString('password', '');
     if (!GWF_Validator::isValidPassword($password)) {
         return GWF_HTML::error('Install Wizard', 'Invalid password (minlength: 6).', false) . self::wizard_8();
     }
     $email = Common::getPostString('email', '');
     if (!GWF_Validator::isValidEmail($email)) {
         return GWF_HTML::error('Install Wizard', 'Invalid email.', false) . self::wizard_8();
     }
     if (false === GWF_InstallFunctions::default_groups()) {
         return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     $back = '';
     if (false === GWF_InstallFunctions::createAdmin($username, $password, $email, $back)) {
         return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     return $back . self::wizard_btn('9') . self::wizard_btn('10');
 }
Beispiel #3
0
 public function validate_password(Module_Register $module, $arg)
 {
     if ($this->isBadPassword($arg) || !GWF_Validator::isValidPassword($arg)) {
         return $this->module->lang('err_pass_weak');
     }
     return false;
 }