CHECK_PASS_EASY_TO_FIND must be true.

remotes/angel/1.11.x
jmontoyaa 8 years ago
parent 8b37c098f3
commit 00754f960d
  1. 2
      main/admin/configure_inscription.php
  2. 3
      main/auth/inscription.php
  3. 2
      main/auth/profile.php

@ -218,7 +218,7 @@ if ($display_all_form) {
$form->addRule('pass1', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('pass2', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule(array('pass1', 'pass2'), get_lang('PassTwo'), 'compare');
if (CHECK_PASS_EASY_TO_FIND) {
if (CHECK_PASS_EASY_TO_FIND === true) {
$form->addRule('pass1', get_lang('PassTooEasy').': '.api_generate_password(), 'callback', 'api_check_password');
}

@ -29,7 +29,6 @@ if ($allowedFieldsConfiguration !== false) {
$allowedFields = isset($allowedFieldsConfiguration['fields']) ? $allowedFieldsConfiguration['fields'] : [];
$allowedFields['extra_fields'] = isset($allowedFieldsConfiguration['extra_fields']) ? $allowedFieldsConfiguration['extra_fields'] : [];
}
$gMapsPlugin = GoogleMapsPlugin::create();
$geolocalization = $gMapsPlugin->get('enable_api') === 'true';
@ -180,7 +179,7 @@ if ($user_already_registered_show_terms === false) {
$form->addRule('pass2', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule(array('pass1', 'pass2'), get_lang('PassTwo'), 'compare');
if (CHECK_PASS_EASY_TO_FIND) {
if (CHECK_PASS_EASY_TO_FIND === true) {
$form->addRule(
'pass1',
get_lang('PassTooEasy') . ': ' . api_generate_password(),

@ -316,7 +316,7 @@ if (is_platform_authentication() &&
$form->addElement('password', 'password2', get_lang('Confirmation'), array('size' => 40));
// user must enter identical password twice so we can prevent some user errors
$form->addRule(array('password1', 'password2'), get_lang('PassTwo'), 'compare');
if (CHECK_PASS_EASY_TO_FIND) {
if (CHECK_PASS_EASY_TO_FIND === true) {
$form->addRule('password1', get_lang('CurrentPasswordEmptyOrIncorrect'), 'callback', 'api_check_password');
}
}

Loading…
Cancel
Save