diff -r 2220bab5c784 -r 390eb356cd49 plugins/SpecialUserPrefs.php --- a/plugins/SpecialUserPrefs.php Mon Jan 21 15:38:50 2008 -0500 +++ b/plugins/SpecialUserPrefs.php Mon Jan 21 17:38:57 2008 -0500 @@ -415,6 +415,20 @@ var frm = document.forms.empwform; if ( frm.newpass.value.length < 1 ) return true; + + pass1 = frm.newpass.value; + pass2 = frm.newpass_conf.value; + if ( pass1 != pass2 ) + { + alert($lang.get('usercp_emailpassword_err_password_no_match')); + return false; + } + if ( pass1.length < 6 && pass1.length > 0 ) + { + alert($lang.get('usercp_emailpassword_err_password_too_short')); + return false; + } + if(aes_testpassed) { frm.use_crypt.value = 'yes'; @@ -427,21 +441,6 @@ len = ( typeof cryptkey == 'string' || typeof cryptkey == 'object' ) ? '\nLen: '+cryptkey.length : ''; alert('The key is messed up\nType: '+typeof(cryptkey)+len); } - } - pass1 = frm.newpass.value; - pass2 = frm.newpass_conf.value; - if ( pass1 != pass2 ) - { - alert('The passwords you entered do not match.'); - return false; - } - if ( pass1.length < 6 && pass1.length > 0 ) - { - alert('The new password must be 6 characters or greater in length.'); - return false; - } - if(aes_testpassed) - { pass = frm.newpass.value; pass = stringToByteArray(pass); cryptstring = rijndaelEncrypt(pass, cryptkey, 'ECB'); @@ -548,74 +547,74 @@ if ( !$q ) $db->_die(); - echo '