This patch adds the same password validation that's done at registration
to the user edit form, preventing the user from changing their password
to something that wouldn't've been allowed at registration time.

This would be a pretty much required precursor to implementing proper
password strength checking in logintoboggan_validate_pass.

Index: wuffden/modules/logintoboggan/logintoboggan.module
===================================================================
--- wuffden.orig/modules/logintoboggan/logintoboggan.module	2006-09-12 00:21:14.000000000 +0100
+++ wuffden/modules/logintoboggan/logintoboggan.module	2006-09-12 00:42:47.000000000 +0100
@@ -103,6 +103,7 @@
       }
       break;
     case 'user_edit':
+      $form['#validate'] += array('logintoboggan_user_edit_validate' => array());
       $user = user_load(array('uid' => arg(1)));
       $id = logintoboggan_validating_id();
       $in_pre_auth_role = in_array($id, array_keys($user->roles));
@@ -338,6 +339,21 @@
 }
 
 /**
+ * Custom validation function for user edit form
+ *
+ * @ingroup logintoboggan_form
+ */
+function logintoboggan_user_edit_validate($form_id, $form_values) {
+  if (strlen($form_values['pass'])) {
+    // if we're changing the password, validate it
+    $pass_err = logintoboggan_validate_pass($form_values['pass']);
+    if ($pass_err) {
+      form_set_error('pass', $pass_err);
+    }
+  }
+}
+
+/**
  * Implementation of hook_init()
  *
  * @ingroup logintoboggan_core
