diff -r 0ae1b281a884 -r af0f6ec48de3 plugins/SpecialAdmin.php --- a/plugins/SpecialAdmin.php Mon Sep 17 11:52:58 2007 -0400 +++ b/plugins/SpecialAdmin.php Tue Sep 18 00:30:43 2007 -0400 @@ -191,6 +191,17 @@ setConfig('smtp_user', $_POST['smtp_user']); if($_POST['smtp_pass'] != 'XXXXXXXXXXXX') setConfig('smtp_password', $_POST['smtp_pass']); + // Password strength + if ( isset($_POST['pw_strength_enable']) ) setConfig('pw_strength_enable', '1'); + else setConfig('pw_strength_enable', '0'); + + $strength = intval($_POST['pw_strength_minimum']); + if ( $strength >= -10 && $strength <= 30 ) + { + $strength = strval($strength); + setConfig('pw_strength_minimum', $strength); + } + echo '
Your changes to the site configuration have been saved.

'; } @@ -339,6 +350,28 @@ + Password strength + + + + Enable password strength analysis
+ This should be enabled in most cases. When this is enabled, a strength meter and a numerical score will be displayed wherever a password can be changed. + + + + + + + + + Minimum strength score
+ This is the lowest score a password will be allowed to have. -10 will allow any password. A score of under -3 is considered weak, under 1 is fair, under 4 is good, under 10 is strong, and 10 and above are very strong. The scale is open-ended. This only has an effect if the meter is enabled above. + + + + + + E-mail sent from the site @@ -946,12 +979,15 @@ else { $disabled = ( $r['user_id'] == $session->user_id ) ? ' disabled="disabled" ' : ''; + $evt_get_score = ( getConfig('pw_strength_enable') == '1' ) ? 'onkeyup="password_score_field(this);" style="margin-right: 7px;" ' : ''; + $meter = ( getConfig('pw_strength_enable') == '1' ) ? '

Password complexity requirements are not enforced here.

' : ''; echo('

Edit User Info

- + + '.$meter.' ' . ( ( !empty($disabled) ) ? '' : '' ) . '
Username:
New Password:
New Password:
E-mail:
Real Name:
To change your e-mail address, password, or real name, please use the user control panel.