diff -up --new-file user_delete.admin.inc user_delete.admin.inc
--- user_delete.admin.inc	1969-12-31 18:00:00.000000000 -0600
+++ user_delete.admin.inc	2009-06-26 16:46:45.000000000 -0500
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Administrative settings page
+ *
+ * @return array
+ *   a form array
+ */
+function user_delete_settings() {
+  //TODO: add additional settings based on http://drupal.org/node/8#comment-628434
+  
+  $form['user_delete_redirect'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Redirection page'),
+    '#default_value' => variable_get('user_delete_redirect', '<front>'),
+    '#description' => t('Choose where to redirect your users after account deletion. Any valid Drupal path will do, e.g. %front or %node', array('%front' => '<front>', '%node' => 'node/1')),
+    '#required' => TRUE,
+  );
+  
+  return system_settings_form($form);
+}
diff -up user_delete.info user_delete.info
--- user_delete.info	2009-06-26 17:04:40.000000000 -0500
+++ user_delete.info	2009-06-26 16:46:46.000000000 -0500
@@ -1,6 +1,7 @@
 ; $Id: user_delete.info,v 1.1 2007/08/08 12:36:57 sanduhrs Exp $
 name         = User Delete
 description  = "Let users delete their account."
+core = 6.x
 ; Information added by drupal.org packaging script on 2008-07-19
 version = "5.x-1.0"
 project = "user_delete"
diff -up user_delete.module user_delete.module
--- user_delete.module	2009-06-26 17:04:42.000000000 -0500
+++ user_delete.module	2009-06-26 16:46:47.000000000 -0500
@@ -1,106 +1,87 @@
-<?php
-/* $Id: user_delete.module,v 1.3.2.7 2008/03/05 14:57:16 sanduhrs Exp $ */
-
-/**
- * @file
- * Allows users to delete their own account.
- *
- * This module will be abandoned when http://drupal.org/node/8 is fixed.
- *
- * @author
- * Stefan Auditor <stefan.auditor@erdfisch.de>
- */
-
-/**
- * Implementation of hook_perm().
- */
-function user_delete_perm() {
-  return array('delete own account');
-}
-
-/**
- * Implementation of hook_menu().
- */
-function user_delete_menu($may_cache) {
-  global $user;
-  $items = array();
-
-  if (!$may_cache) {
-    $items[] = array(
-      'path' => 'user/'. arg(1) .'/delete',
-      'title' => t('Delete'),
-      'callback' => 'user_edit',
-      'access' => (user_access('administer users') || (user_access('delete own account') && arg(1) == $user->uid)),
-      'type' => MENU_CALLBACK,
-    );
-    $items[] = array(
-      'path' => 'admin/user/user_delete',
-      'title' => t('User delete'),
-      'description' => t("Configure the user delete action."),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => 'user_delete_settings',
-      'access' => user_access('administer users'),
-    );
-  }
-
-  return $items;
-}
-
-
-/**
- * Implementation of hook_form_alter().
- */
-function user_delete_form_alter($form_id, &$form) {
-  global $user;
-
-  if($form_id == 'user_edit') {
-    //access check
-    if(user_access('delete own account') && arg(1) == $user->uid) {
-      $form['delete'] = array(
-        '#type' => 'submit',
-        '#value' => t('Delete'),
-        '#weight' => 31,
-      );
-    }
-  }
-}
-
-/**
- * Administrative settings page
- *
- * @return array
- *   a form array
- */
-function user_delete_settings() {
-  //TODO: add additional settings based on http://drupal.org/node/8#comment-628434
-  
-  $form['user_delete_redirect'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Redirection page'),
-    '#default_value' => variable_get('user_delete_redirect', '<front>'),
-    '#description' => t('Choose where to redirect your users after account deletion. Any valid Drupal path will do, e.g. %front or %node', array('%front' => '<front>', '%node' => 'node/1')),
-    '#required' => TRUE,
-  );
-  
-  return system_settings_form($form);
-}
-
-/**
- * Implementation of hook_user().
- */
-function user_delete_user($op, &$edit, &$account, $category = NULL) {
-  global $user;
-
-  //Note: $account->uid and $user->uid are still available!
-  if ($op == 'delete' && ($account->uid == $user->uid)) {
-    //TODO: add additional actions based on http://drupal.org/node/8#comment-628434
-    
-    //Imitate default behaviour
-    //Assign all nodes and comments to anonymous
-    db_query("UPDATE {node} SET uid=0 WHERE uid=%d", $account->uid);
-    db_query("UPDATE {comments} SET uid=0 WHERE uid=%d", $account->uid);
-    
-    //Redirect
-    drupal_goto(variable_get('user_delete_redirect', '<front>'));
-  }
-}
+<?php
+/* $Id: user_delete.module,v 1.3.2.7 2008/03/05 14:57:16 sanduhrs Exp $ */
+
+/**
+ * @file
+ * Allows users to delete their own account.
+ *
+ * This module will be abandoned when http://drupal.org/node/8 is fixed.
+ *
+ * @author
+ * Stefan Auditor <stefan.auditor@erdfisch.de>
+ */
+
+/**
+ * Implementation of hook_perm().
+ */
+function user_delete_perm() {
+  return array('delete own account');
+}
+
+/**
+ * Implementation of hook_menu().
+ */
+function user_delete_menu() {
+  $items['admin/user/user_delete'] = array(
+    'title' => 'User delete',
+    'description' => "Configure the user delete action.",
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('user_delete_settings'),
+    'access arguments' => array('administer users'),
+    'file' => 'user_delete.admin.inc',
+);
+
+  return $items;
+}
+
+/**
+  * Implementation of hook_menu_alter().
+*/
+function user_delete_menu_alter(&$callbacks) {
+  $callbacks['user/%user/delete']['access callback'] = 'user_delete_access';
+  $callbacks['user/%user/delete']['access arguments'] = array(1);
+  $callbacks['user/%user/delete']['type'] = MENU_LOCAL_TASK;
+}
+
+/**
+ * Checks whether a user can delete an account
+ */
+function user_delete_access($account) {
+  	global $user;
+	return (user_access('administer users') || (user_access('delete own account') && $account->uid == $user->uid));
+}
+
+/**
+ * Implementation of hook_form_user_profile_form_alter().
+*/
+function user_delete_form_user_profile_form_alter($form, &$form_state) {
+  global $user;
+  if (user_access('delete own account') && arg(1) == $user->uid) {
+    $form['delete'] = array(
+      '#type' => 'submit',
+      '#value' => t('Delete'),
+      '#weight' => 31,
+      '#submit' => array('user_edit_delete_submit'),
+	    );
+  }
+ }
+
+/**
+ * Implementation of hook_user().
+ */
+function user_delete_user($op, &$edit, &$account, $category = NULL) {
+  global $user;
+
+  //Note: $account->uid and $user->uid are still available!
+  if ($op == 'delete' && ($account->uid == $user->uid)) {
+    //TODO: add additional actions based on http://drupal.org/node/8#comment-628434
+    
+    //Imitate default behaviour
+    //Assign all nodes and comments to anonymous
+    db_query("UPDATE {node} SET uid=0 WHERE uid=%d", $account->uid);
+    db_query("UPDATE {comments} SET uid=0 WHERE uid=%d", $account->uid);
+    
+    //Redirect
+    drupal_goto(variable_get('user_delete_redirect', '<front>'));
+  }
+}
