--- password_change/password_change.install	Mon Dec 14 06:38:03 2009
+++ password_change/password_change.install	Wed Oct 27 07:15:20 2010
@@ -1,11 +1,20 @@
-<?php
-// $Id: password_change.install,v 1.2 2009/12/14 05:38:03 davereid Exp $
-
-/**
- * @file
- * Install and uninstall schema and functions for the password_change module.
- */
-
-function password_change_uninstall() {
-  variable_del('password_change_all');
-}
+<?php
+// $Id: password_change.install,v 1.2 2009/12/14 05:38:03 davereid Exp $
+
+/**
+ * @file
+ * Install and uninstall schema and functions for the password_change module.
+ */
+
+// based on phpass.module
+function password_change_install() {
+  // detect presence of phpass module (phpass hash method set as 'phpass')
+  if (module_exists("phpass") && variable_get('user_hash_method', 'phpass') == 'phpass') {
+    // check if PasswordHash.php is missing (phpass.module)
+    _phpass_is_passwordhash_php_missing();
+  }
+}
+
+function password_change_uninstall() {
+  variable_del('password_change_all');
+}
