plugins/SpecialUserPrefs.php
changeset 1169 d5474f54a525
parent 1095 5f623b0de18e
child 1227 bdac73ed481e
equal deleted inserted replaced
1168:277a9cdead3e 1169:d5474f54a525
   248             if ( strlen($newpass) < 6 )
   248             if ( strlen($newpass) < 6 )
   249               $errors .= '<div class="error-box" style="margin: 0 0 10px 0;">' . $lang->get('usercp_emailpassword_err_password_too_short') . '</div>';
   249               $errors .= '<div class="error-box" style="margin: 0 0 10px 0;">' . $lang->get('usercp_emailpassword_err_password_too_short') . '</div>';
   250             if ( getConfig('pw_strength_enable') == '1' )
   250             if ( getConfig('pw_strength_enable') == '1' )
   251             {
   251             {
   252               $score_inp = password_score($newpass);
   252               $score_inp = password_score($newpass);
       
   253               $score_min = getConfig('pw_strength_minimum', -10);
   253               if ( $score_inp < $score_min )
   254               if ( $score_inp < $score_min )
   254                 $errors .= '<div class="error-box" style="margin: 0 0 10px 0;">' . $lang->get('usercp_emailpassword_err_password_too_weak', array('score' => $score_inp)) . '</div>';
   255                 $errors .= '<div class="error-box" style="margin: 0 0 10px 0;">' . $lang->get('usercp_emailpassword_err_password_too_weak', array('score' => $score_inp)) . '</div>';
   255             }
   256             }
   256             if ( $_POST['use_crypt'] == 'no' && $newpass != $_POST['newpass_confirm'] )
   257             if ( $_POST['use_crypt'] == 'no' && $newpass != $_POST['newpass_confirm'] )
   257             {
   258             {