Fixed some bugs with the change password form when pw_strength_enable is 0.
authorDan Fuhry <dan@enanocms.org>
Sat, 21 Aug 2010 23:29:54 -0400
changeset 1293 83e0fcd008e1
parent 1291 a971f6efcb7b
child 1294 f61a263564b2
Fixed some bugs with the change password form when pw_strength_enable is 0.
plugins/SpecialUserFuncs.php
--- a/plugins/SpecialUserFuncs.php	Tue Aug 17 11:35:16 2010 -0400
+++ b/plugins/SpecialUserFuncs.php	Sat Aug 21 23:29:54 2010 -0400
@@ -1458,7 +1458,7 @@
 					return false;
 				}
 			}
-			if ( getConfig('pw_strength_enable') == '1' )
+			if ( getConfig('pw_strength_enable') == 1 )
 			{
 				$min_score = intval(getConfig('pw_strength_minimum'));
 				$inp_score = password_score($data);
@@ -1513,6 +1513,7 @@
 			</div>
 			<?php echo $session->generate_aes_form(); ?>
 		</form>
+		<?php if ( getConfig('pw_strength_enable') == 1 ): ?>
 		<script type="text/javascript">
 		addOnloadHook(function()
 			{
@@ -1521,6 +1522,8 @@
 			});
 		</script>
 		<?php
+		endif;
+		
 		echo $session->aes_javascript('resetform', 'pass', 'use_crypt', 'crypt_key', 'crypt_data', 'challenge_data', 'dh_supported', 'dh_public_key', 'dh_client_public_key');
 		$template->footer();
 		return true;