--- advuser.install	2010-04-16 21:09:31.000000000 -0500
+++ advuserNEW.install	2010-07-04 16:32:26.000000000 -0500
@@ -34,4 +34,37 @@ function advuser_uninstall() {
   cache_clear_all('variables', 'cache');
 }
 
+/**
+ * Implementation of hook_requirements().
+ */
+ 
+function advuser_requirements($phase) {
+  $requirements = array();
+  // Ensure translations don't break at install time
+  $t = get_t();
+
+  if ($phase == 'runtime') {
+    /**
+     * This check is important to catch updates from previous versions the
+     * Token module wasn't yet a dependency.
+     */
+    if (!module_exists('token')) {
+      $requirements['advuser_token'] = array(
+        'title' => $t('!module module', array('!module' => $t('Token'))),
+        'value' => $t('Disabled'),
+        'severity' => REQUIREMENT_ERROR,
+        'description' => $t(
+          'Since version 6.x-3.x the !this_module module needs the !token module for token substitution. Please install and enable it.',
+          array(
+            '!token' => l($t('Token'), 'http://drupal.org/project/token'),
+            '!this_module' => $t('Advanced User')
+          )
+        ),
+      );
+    }
+  }
+
+  return $requirements;
+}
+
 // vim:ft=php:sts=2:sw=2:ts=2:et:ai:sta:ff=unix
