diff --git a/advuser.info b/advuser.info
index a53a946..ec62e86 100644
--- a/advuser.info
+++ b/advuser.info
@@ -1,3 +1,3 @@
 name = Advanced User Management
 description = Advanced user management providing advanced filtering of users and providing mass actions of selected filtered users across multiple pages of the users list.
-core = 6.x
+core = 7.x
diff --git a/advuser.install b/advuser.install
index 100e6ae..b64b071 100644
--- a/advuser.install
+++ b/advuser.install
@@ -1,5 +1,9 @@
 <?php
-
+// $Id$
+/**
+ * @file
+ * Supply the hooks for uninstall.
+ */
 /**
  * Implementation of hook_uninstall
  *
diff --git a/advuser.module b/advuser.module
index 428aece..d55b7e5 100644
--- a/advuser.module
+++ b/advuser.module
@@ -1,4 +1,5 @@
 <?php
+// $Id$
 /**
  * @file
  * Advanced user module allows you to select users based on an advanced set of
@@ -110,9 +111,9 @@ well as the normal actions already available.');
 
 /**
  * @ingroup advuser_hook
- * Implementation of hook_perm().
+ * Implementation of hook_permission().
  */
-function advuser_perm() {
+function advuser_permission() {
   return array(
     'administer advuser',
     'access advuser',
@@ -128,8 +129,8 @@ function advuser_perm() {
 function advuser_menu() {
 
   $items['admin/settings/advuser'] = array(
-    'title' => t('Advanced User'),
-    'description' => t('Advanced User Settings'),
+    'title' => 'Advanced User',
+    'description' => 'Advanced User Settings',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('advuser_settings'),
     'access arguments' => array('administer advuser'),
@@ -137,30 +138,30 @@ function advuser_menu() {
     'file' => 'forms/advuser_settings.inc',
   );
 
-  $items['admin/user/user/advuser'] = array(
-    'title' => t('Advanced'),
-    'description' => t('List, add, edit and email users.'),
+  $items['admin/people/advuser'] = array(
+    'title' => 'Advanced',
+    'description' => 'List, add, edit and email users.',
     'page callback' => 'advuser_admin', 
     'page arguments' => array('list'), 
-    'access callback' => 'advuser_admin_access',
+    'access callback' => 'advuser_admin_access_',
     'access arguments' => array('access advuser', 'administer users'),
     'type' => MENU_LOCAL_TASK,
     'file' => 'forms/advuser_admin.inc',
   );
 
-  $items['admin/user/user/advuser/confirm/email'] = array(
+  $items['admin/people/advuser/confirm/email'] = array(
     'page callback' => 'drupal_get_form',
     'page arguments' => array('advuser_multiple_email_confirm'),
-    'access callback' => 'advuser_admin_access',
+    'access callback' => 'advuser_admin_access_',
     'access arguments' => array('access advuser', 'administer users', 'send email advuser'),
     'type' => MENU_CALLBACK,
     'file' => 'forms/advuser_multiple_email_confirm.inc'
   );
 
-  $items['admin/user/user/advuser/confirm/delete'] = array(
+  $items['admin/people/advuser/confirm/delete'] = array(
     'page callback' => 'drupal_get_form',
     'page arguments' => array('advuser_multiple_delete_confirm'),
-    'access callback' => 'advuser_admin_access',
+    'access callback' => 'advuser_admin_access_',
     'access arguments' => array('access advuser', 'administer users'),
     'type' => MENU_CALLBACK,
     'file' => 'forms/advuser_multiple_delete_confirm.inc'
@@ -172,7 +173,7 @@ function advuser_menu() {
 /**
  * Access callback for menu items.
  */
-function advuser_admin_access () {
+function advuser_admin_access_() {
   $accesses = func_get_args();
   if (empty($accesses)) {
     $accesses = array('access advuser');
@@ -234,12 +235,12 @@ function advuser_advuser_operations($form_state = array()) {
 
     $add_roles = array();
     foreach ($roles as $key => $value) {
-      $add_roles['add_role-'. $key] = $value;
+      $add_roles['add_role-' . $key] = $value;
     }
 
     $remove_roles = array();
     foreach ($roles as $key => $value) {
-      $remove_roles['remove_role-'. $key] = $value;
+      $remove_roles['remove_role-' . $key] = $value;
     }
 
     if (count($roles)) {
@@ -295,7 +296,7 @@ function _advuser_get_variables($user) {
   return array(
     '%user_name' => $user->name,
     '%site' => variable_get("site_name", "drupal"), 
-    '%uri' => url('user/'. $user->uid, array('absolute' => TRUE)), 
+    '%uri' => url('user/' . $user->uid, array('absolute' => TRUE)), 
     '%user_email' => $user->mail,
     '%user_status' => t($user->status ? 'Active' : 'Blocked'),
     '%user_theme' => empty($user->theme) ? t('DEFAULT') : $user->theme,
@@ -313,7 +314,7 @@ function _advuser_get_variables($user) {
  * @return resource         // The result of the db_query.
  */
 function _advuser_dbquery_users_to_notify() {
-  $user_where = users_by_access('receive email advuser');
+  $user_where = users_by_access_('receive email advuser');
   $user_where = implode(',', $user_where);
   return empty($user_where) ? FALSE : db_query('SELECT u.* FROM {users} u WHERE u.uid IN (' . $user_where . ')');
 }
@@ -325,8 +326,8 @@ function _advuser_dbquery_users_to_notify() {
  * @param string $perm                  // The string permission.
  * @return array                        // An array of uid.
  */
-function users_by_access($perm) {
-  $select_permissions = "SELECT ur.uid FROM {permission} p LEFT JOIN {users_roles} ur ON ur.rid = p.rid WHERE p.perm like '%%%s%%'";
+function users_by_access_($perm) {
+  $select_permissions = "SELECT ur.uid FROM {role_permission} p LEFT JOIN {users_roles} ur ON ur.rid = p.rid WHERE p.permission like '%%%s%%'";
   $ret = array();
   $result = db_query($select_permissions, $perm);
   while ($data = db_fetch_object($result)) {
@@ -349,7 +350,7 @@ function users_by_access($perm) {
  * @param string $op
  * @param object $account
  */
-function _advuser_receive_notification_by_role ($op, $account) {
+function _advuser_receive_notification_by_role($op, $account) {
   static $accounts = array();
 
   $from = variable_get("site_mail", ini_get("sendmail_from"));
@@ -399,7 +400,7 @@ function _advuser_receive_notification_by_role ($op, $account) {
  * On 'insert' call the registration notification function.
  * On 'after_update' call the profile update notification function.
  */
-function advuser_user($type, &$edit, &$account, $category = NULL) {
+function advuser_user_($type, &$edit, &$account, $category = NULL) {
   static $account_before_edit;
   static $insert = FALSE;
   $return = NULL;
@@ -424,7 +425,7 @@ function advuser_user($type, &$edit, &$account, $category = NULL) {
       if (is_string($account->data)) {
         $account_before_edit->data = unserialize($account->data);
       }
-      unset ($account_before_edit->data['form_build_id']);
+      unset($account_before_edit->data['form_build_id']);
     } break;
     case 'insert': {
       // Flag that we've seen the insert operation. The insert hasn't occurred
@@ -441,7 +442,7 @@ function advuser_user($type, &$edit, &$account, $category = NULL) {
       if (is_string($account_after_edit->data)) {
         $account_after_edit->data = unserialize($account->data);
       }
-      unset ($account_after_edit->data['form_build_id']);
+      unset($account_after_edit->data['form_build_id']);
       if ($account_after_edit->login == 0) {
         if (variable_get('advuser_reset_never_access', FALSE)) {
           $account_after_edit->access = 0;
@@ -456,6 +457,25 @@ function advuser_user($type, &$edit, &$account, $category = NULL) {
   return $return;
 }
 
+function advuser_user_load($users) {
+  foreach ($users as $account) {
+    advuser_user_('load', $nullp, $account);
+  }
+}
+
+function advuser_user_presave(&$edit, $account, $category) {
+  advuser_user_load(array($account));
+  return advuser_user_('form', $edit, $account, $category);
+}
+
+function advuser_user_insert(&$edit, $account, $category) {
+  return advuser_user_('insert', $edit, $account, $category);
+}
+
+function advuser_user_update(&$edit, $account, $category) {
+  return advuser_user_('after_update', $edit, $account, $category);
+}
+
 function _advuser_update_never_accessed($uid) {
   global $user;
   if ($user->uid != $uid && user_access('administer users')) {
@@ -507,7 +527,7 @@ function advuser_user_roles() {
   static $roles = array();
   if (empty($roles)) {
     $roles = user_roles(TRUE);
-    unset ($roles[DRUPAL_AUTHENTICATED_RID]);
+    unset($roles[DRUPAL_AUTHENTICATED_RID]);
   }
   return $roles;
 }
@@ -523,7 +543,7 @@ function advuser_user_roles() {
  * - $type = 'count' returns a select string for the count for the list.
  * - $type = 'uid' returns a select string that includes the uid.
  */
-function advuser_build_query ($type = 'users') {
+function advuser_build_query($type = 'users') {
   $filter = advuser_build_filter_query();
 
   // Array used for user profile DB query joins.
@@ -539,16 +559,16 @@ function advuser_build_query ($type = 'users') {
 
   switch ($type) {
     case 'users': {
-      $sql = 'SELECT DISTINCT u.uid, u.name, u.mail, u.status, u.created, u.access FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid '. $filter['join'];
+      $sql = 'SELECT DISTINCT u.uid, u.name, u.mail, u.status, u.created, u.access FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid ' . $filter['join'];
     } break;
     case 'uid': {
-      $sql = 'SELECT DISTINCT u.uid as uid FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid '. $filter['join'];
+      $sql = 'SELECT DISTINCT u.uid as uid FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid ' . $filter['join'];
     } break;
     case 'name': {
       $sql = 'SELECT DISTINCT u.uid, u.name FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid ' . $filter['join'];
     } break;
     case 'count': {
-      $sql = 'SELECT COUNT(DISTINCT u.uid) FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid '. $filter['join'];
+      $sql = 'SELECT COUNT(DISTINCT u.uid) FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid ' . $filter['join'];
     } break;
   }
 
@@ -635,7 +655,7 @@ function advuser_build_filter_query($reset = FALSE) {
       }
 
       // Build the 'where' clauses.
-      $_where = $op.' '.str_ireplace("%op", $qop, $advuser_filters[$key]['where']);
+      $_where = $op . ' ' . str_ireplace("%op", $qop, $advuser_filters[$key]['where']);
       $_where = str_ireplace("%eq", $eq, $_where);
       $_where = str_ireplace("%andor", $andor, $_where);
       $where[] = str_ireplace("%in", $in, $_where);
@@ -647,8 +667,8 @@ function advuser_build_filter_query($reset = FALSE) {
       $join[] = $advuser_filters[$key]['join'];
     }
 
-    $where = count($where) ? '('. implode(' ', $where) . ')' : '';
-    $join = count($join) ? ' '. implode(' ', array_unique($join)) : '';
+    $where = count($where) ? '(' . implode(' ', $where) . ')' : '';
+    $join = count($join) ? ' ' . implode(' ', array_unique($join)) : '';
 
     $filter_array = array(
       'where' => $where,
@@ -670,8 +690,8 @@ function advuser_filters() {
   if (empty($filters)) {
     $options = array();
     $t_module = t('module');
-    foreach (module_list() as $module) {
-      if ($permissions = module_invoke($module, 'perm')) {
+    foreach (module_implements('permission') as $module) {
+      if ($permissions = module_invoke($module, 'permission')) {
         asort($permissions);
         foreach ($permissions as $permission) {
           $options["$module $t_module"][$permission] = t($permission);
@@ -790,7 +810,7 @@ function advuser_multiple_role_edit($accounts, $operation, $rid) {
         $sql = advuser_build_query('uid');
         $result = db_query($sql, $filter['args']);
         while ($user = db_fetch_array($result)) {
-          $account = user_load($user);
+          $account = user_load((int)$user['uid'], TRUE);
           if ($account !== FALSE && !isset($account->roles[$rid])) {
             $roles = $account->roles + array($rid => $role_name);
             user_save($account, array('roles' => $roles));
@@ -800,7 +820,7 @@ function advuser_multiple_role_edit($accounts, $operation, $rid) {
       }
       else {
         foreach ($accounts as $uid) {
-          $account = user_load(array('uid' => (int)$uid));
+          $account = user_load((int)$uid, TRUE);
           // Skip adding the role to the user if they already have it.
           if ($account !== FALSE && !isset($account->roles[$rid])) {
             $roles = $account->roles + array($rid => $role_name);
@@ -815,7 +835,7 @@ function advuser_multiple_role_edit($accounts, $operation, $rid) {
         $sql = advuser_build_query('uid');
         $result = db_query($sql, $filter['args']);
         while ($user = db_fetch_array($result)) {
-          $account = user_load($user);
+          $account = user_load((int)$user['uid'], TRUE);
           if ($account !== FALSE && isset($account->roles[$rid])) {
             $roles = array_diff($account->roles, array($rid => $role_name));
             user_save($account, array('roles' => $roles));
@@ -825,7 +845,7 @@ function advuser_multiple_role_edit($accounts, $operation, $rid) {
       }
       else {
         foreach ($accounts as $uid) {
-          $account = user_load(array('uid' => (int)$uid));
+          $account = user_load((int)$uid, TRUE);
           // Skip removing the role from the user if they already don't have it.
           if ($account !== FALSE && isset($account->roles[$rid])) {
             $roles = array_diff($account->roles, array($rid => $role_name));
diff --git a/advuser_filters.inc b/advuser_filters.inc
index ebad627..971f08c 100644
--- a/advuser_filters.inc
+++ b/advuser_filters.inc
@@ -1,4 +1,5 @@
 <?php
+// $Id$
 /**
  * @file
  * Advanced user module allows you to select users based on an advanced set of
@@ -37,7 +38,8 @@ function advuser_filter_form() {
         '%property' => $filters[$type]['title'],
         '%value' => $options[$value]
       );
-    } else {
+    }
+    else {
       $params = array(
         '%property' => $filters[$type]['title'], 
         '%value' => $value
@@ -45,23 +47,23 @@ function advuser_filter_form() {
     }
     if ($i++ > 0) {
       $form['filters']['current'][] = array(
-        '#value' => t('<em>'.
-                      $op.
-                      '</em> where <strong>%property</strong> '.
-                      _qop($qop).
+        '#value' => t('<em>' .
+                      $op .
+                      '</em> where <strong>%property</strong> ' .
+                      _qop($qop) .
                       ' <strong>%value</strong>',
                       $params
-                     ).
+                     ) .
                     ($i == count($session) ? ')' : ''), 
       );
     }
     else {
       $form['filters']['current'][] = array(
-        '#value' => t('(<strong>%property</strong> '.
-                      _qop($qop).
+        '#value' => t('(<strong>%property</strong> ' .
+                      _qop($qop) .
                       ' <strong>%value</strong>',
                       $params
-                     ).
+                     ) .
                     ($i == count($session) ? ')' : ''), 
       );
     }
@@ -83,7 +85,7 @@ function advuser_filter_form() {
           '#size' => 20,
           '#maxlength' => 25,
           '#default_value' => 'now',
-          '#description' => 'You can enter this as an actual date (e.g. "'. date('M d Y') .'") or how long ago (e.g. "1 month 4 day 13hours ago")',
+          '#description' => 'You can enter this as an actual date (e.g. "' . date('M d Y') . '") or how long ago (e.g. "1 month 4 day 13hours ago")',
         );
       } break;
       case 'id': {
@@ -102,7 +104,7 @@ function advuser_filter_form() {
       default: {
         $autocomplete = '';
         if ($filter['autocomplete']) {
-          $autocomplete = "profile/autocomplete/". $filter['autocomplete'];
+          $autocomplete = "profile/autocomplete/" . $filter['autocomplete'];
         }
         switch ($filter['type']) {
           case 'selection': {
@@ -274,8 +276,8 @@ function advuser_filters() {
   $filters = array();
   $options = array();
   $t_module = t('module');
-  foreach (module_list() as $module) {
-    if ($permissions = module_invoke($module, 'perm')) {
+  foreach (module_implements('permission') as $module) {
+    if ($permissions = module_invoke($module, 'permission')) {
       asort($permissions);
       foreach ($permissions as $permission) {
         $options["$module $t_module"][$permission] = t($permission);
@@ -426,7 +428,7 @@ function advuser_build_filter_query() {
       }
     }
 
-    $_where = $op.' '.str_ireplace("%op", $qop, $filters[$key]['where']);
+    $_where = $op . ' ' . str_ireplace("%op", $qop, $filters[$key]['where']);
     $_where = str_ireplace("%eq", $eq, $_where);
     $_where = str_ireplace("%andor", $andor, $_where);
     $where[] = str_ireplace("%in", $in, $_where);
@@ -434,8 +436,8 @@ function advuser_build_filter_query() {
     $join[] = $filters[$key]['join'];
   }
 
-  $where = count($where) ? 'AND ('. implode(' ', $where) . ')' : '';
-  $join = count($join) ? ' '. implode(' ', array_unique($join)) : '';
+  $where = count($where) ? 'AND (' . implode(' ', $where) . ')' : '';
+  $join = count($join) ? ' ' . implode(' ', array_unique($join)) : '';
 
   return array(
     'where' => $where,
@@ -478,7 +480,8 @@ function advuser_filter_form_submit($form, &$form_state) {
               $form_state['values']['filters_qops'],
             );
           }
-        } else {
+        }
+        else {
           if (isset($form_state['values'][$filter])) {
             $_SESSION['advuser_overview_filter'][] = array(
                $filter, 
diff --git a/forms/advuser_admin.inc b/forms/advuser_admin.inc
index 0f1e2ed..dd0bfc7 100644
--- a/forms/advuser_admin.inc
+++ b/forms/advuser_admin.inc
@@ -1,4 +1,5 @@
 <?php
+// $Id$
 /**
  * @file
  *
diff --git a/forms/advuser_admin_account.inc b/forms/advuser_admin_account.inc
index b560231..ab2d074 100644
--- a/forms/advuser_admin_account.inc
+++ b/forms/advuser_admin_account.inc
@@ -1,4 +1,5 @@
 <?php
+// $Id$
 /**
  * @file
  *
@@ -10,7 +11,7 @@
 /**
  * Provide the list of filtered users.
  */
-function advuser_admin_account(&$form_state) {
+function advuser_admin_account($form_state) {
   // Get the filters for the user data.
   $filter = advuser_build_filter_query();
 
@@ -22,7 +23,7 @@ function advuser_admin_account(&$form_state) {
 
   foreach (advuser_profile_fields() as $field) {
     if (isset($field->name)) {
-      $ff[] = array('data'=>t($field->title), 'field'=>"$field->name.value");
+      $ff[] = array('data' => t($field->title), 'field' => "$field->name.value");
     }
   }
 
@@ -107,7 +108,7 @@ function advuser_admin_account(&$form_state) {
       if (module_exists('profile')) {
         profile_load_profile($account);
       }
-      foreach(advuser_profile_fields() as $field) {
+      foreach (advuser_profile_fields() as $field) {
         $form[$field->name][$account->uid] = array('#value' => profile_view_field($account, $field));
       }
       if ($account->uid) {
@@ -174,7 +175,7 @@ function advuser_admin_account_submit($form, &$form_state) {
     } break;
     case 'block': {
       foreach ($accounts as $user_id) {
-        $account = user_load(array('uid' => $user_id));
+        $account = user_load((int)$user_id, TRUE);
         if ($account !== FALSE && $account->status == 1) {
           user_save($account, array('status' => 0));
         }
@@ -184,7 +185,7 @@ function advuser_admin_account_submit($form, &$form_state) {
     } break;
     case 'unblock': {
       foreach ($accounts as $user_id) {
-        $account = user_load(array('uid' => $user_id));
+        $account = user_load((int)$user_id, TRUE);
         if ($account !== FALSE && $account->status == 0) {
           user_save($account, array('status' => 1));
         }
@@ -217,7 +218,7 @@ function advuser_admin_account_submit($form, &$form_state) {
     call_user_func_array($function, $args);
 
     $act = str_replace('_', ' ', $operation['callback arguments'][0]);
-    drupal_set_message(t('The !action action has been applied.', array('!action' => t($act))));
+    drupal_set_message(t('The @action action has been applied.', array('@action' => t($act))));
   }
 
   // Where to from here?
@@ -254,7 +255,7 @@ function theme_advuser_admin_account(&$form) {
 
   $ff = array();
   foreach (advuser_profile_fields() as $field) {
-    $ff[] = array('data'=>t($field->title), 'field'=>$field->name);
+    $ff[] = array('data' => t($field->title), 'field' => $field->name);
   }
 
   $header = array_merge($header, $ff);
diff --git a/forms/advuser_filter_ui.inc b/forms/advuser_filter_ui.inc
index 7ba690b..506f091 100644
--- a/forms/advuser_filter_ui.inc
+++ b/forms/advuser_filter_ui.inc
@@ -1,4 +1,5 @@
 <?php
+// $Id$
 /**
  * @file
  *
@@ -9,7 +10,7 @@
 /**
  * The phase controller.
  */
-function advuser_filter_ui(&$form_state) {
+function advuser_filter_ui($form_state) {
   $advuser = &$_SESSION['advuser'];
   $phase = &$advuser['phase'];
   $filters = &$advuser['filters'];
@@ -49,7 +50,7 @@ function advuser_filter_ui(&$form_state) {
       $form['filters']['current'][] = array(
         '#prefix' => '<li>',
         '#suffix' => '</li>',
-        '#value' => t('<em>'.
+        '#value' => t('<em>' .
                       $conjunction .
                       '</em> where <strong>%property</strong> ' .
                       _advuser_filter_ui_symbols($operations) .
@@ -63,11 +64,11 @@ function advuser_filter_ui(&$form_state) {
       $form['filters']['current'][] = array(
         '#prefix' => '<ul><li>',
         '#suffix' => ($i == count($filters) ? '</li></ul>' : '</li>'),
-        '#value' => t('(<strong>%property</strong> '.
-                      _advuser_filter_ui_symbols($operations).
+        '#value' => t('(<strong>%property</strong> ' .
+                      _advuser_filter_ui_symbols($operations) .
                       ' <strong>%value</strong>',
                       $params
-                     ).
+                     ) .
                     ($i == count($filters) ? ')' : ''), 
       );
     }
@@ -378,8 +379,8 @@ function _advuser_filter_ui_options($field) {
   $options = array();
   switch ($field) {
     case 'permission': {
-      foreach (module_list() as $module) {
-        if ($permissions = module_invoke($module, 'perm')) {
+      foreach (module_implements('permission') as $module) {
+        if ($permissions = module_invoke($module, 'permission')) {
           asort($permissions);
           foreach ($permissions as $permission) {
             $options["$module $t_module"][$permission] = t($permission);
diff --git a/forms/advuser_multiple_delete_confirm.inc b/forms/advuser_multiple_delete_confirm.inc
index 63e08ba..ab2f663 100644
--- a/forms/advuser_multiple_delete_confirm.inc
+++ b/forms/advuser_multiple_delete_confirm.inc
@@ -1,4 +1,5 @@
 <?php
+// $Id$
 /**
  * @file
  *
@@ -8,7 +9,7 @@
 
 /**
  * Implement the menu callback function for
- * admin/user/user/advuser/confirm/delete.
+ * admin/people/advuser/confirm/delete.
  */
 function advuser_multiple_delete_confirm() {
   $advuser = &$_SESSION['advuser'];
@@ -59,7 +60,7 @@ function advuser_multiple_delete_confirm() {
   return confirm_form(
     $form,
     t('Are you sure you want to delete these users?'),
-    'admin/user/user/advuser', t('This action cannot be undone.'),
+    'admin/people/advuser', t('This action cannot be undone.'),
     t('Delete all'), 
     t('Cancel')
   );
@@ -74,11 +75,11 @@ function advuser_multiple_delete_confirm_submit($form, &$form_state) {
 
   if ($form_state['values']['confirm']) {
     foreach ($accounts as $uid => $value) {
-      user_delete($form_state['values'], $uid);
+      user_cancel($form_state['values'], $uid, $form_state['values']['user_cancel_method']);
     }
     drupal_set_message(t('The users have been deleted.'));
   }
-  $form_state['redirect'] = 'admin/user/user/advuser';
+  $form_state['redirect'] = 'admin/people/advuser';
   advuser_reset_variables();
 }
 
diff --git a/forms/advuser_multiple_email_confirm.inc b/forms/advuser_multiple_email_confirm.inc
index c4f8c78..fa7e199 100644
--- a/forms/advuser_multiple_email_confirm.inc
+++ b/forms/advuser_multiple_email_confirm.inc
@@ -1,4 +1,5 @@
 <?php
+// $Id$
 /**
  * @file
  *
@@ -111,7 +112,7 @@ function advuser_multiple_email_confirm_submit($form, &$form_state) {
 
   if ($form_state['values']['confirm']) {
     foreach ($accounts as $uid => $value) {
-      $account = user_load(array('uid' => $uid));
+      $account = user_load((int)$uid);
       // these are invariant for all sent emails
       $variables = _advuser_get_variables($account);
       $from = $form_state['values']['mailfrom'];
diff --git a/forms/advuser_settings.inc b/forms/advuser_settings.inc
index b0e7e4e..ba9fec3 100644
--- a/forms/advuser_settings.inc
+++ b/forms/advuser_settings.inc
@@ -1,4 +1,5 @@
 <?php
+// $Id$
 /**
  * @file
  *
