I ported this module for drupal6

Patch sponsored by Erdfisch

Comments

giorgio79’s picture

Thanks for this, I was just looking for it :)

am22’s picture

When I apply the patch I get:

Hunk #1 Failed at 1.
1 out of 1 hunk FAILED -- saving rejects to file user_delete.module.rej

user_delete.module.rej:

***************
*** 1,3 ****
  ; $Id: user_delete.info,v 1.1 2007/08/08 12:36:57 sanduhrs Exp $
  name         = User Delete
- description  = "Let users delete their account."--- 1,4 ----
  ; $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

I tried to install the patched module anway, but I get "This version is incompatible with the 6.8 version of Drupal core." Can anybody help me with that?

am22’s picture

Ok, you can see that I am new to using patches. The first part of the patch is regarding the file "user_delete.info". That's where you simply have to add core = 6.x

The patch works fine.

design.er’s picture

Hey,

Thank you very much for porting this important community module to D6.

The only thing that doesn't work yet, is the "delete"-button in the user profile "edit"-page.
When clicking on the "delete"-button, it saves the changes I made on the page.
FYI: I'm using Drupal 6.9 with Content Profile 6.x-1.0-beta3.

The other thing is, perhaps it'd be better to remove the delete tab from the user profile by default. Otherwise unexperienced users may delete their profiles quicker than they really want. :)

Thanks again for your work and regards.
Stefan

kenorb’s picture

+1

dixon_’s picture

Would it be possible to commit this patch to a new DRUPAL-6 branch? Then the community would have something to work with :)

dawehner’s picture

StatusFileSize
new4.02 KB

dixon_ if you want to help, review the patch!

here is a new one which adds a user_delete.admin.inc

dixon_’s picture

Yes, I want help! I will test the patch when I get back to my office on monday. Thanks!

alexanderpas’s picture

+1

dixon_’s picture

@ my previous post... That should obviously be "I want to help". Missed one little important word! :)

Plazmus’s picture

Hi Guys,

I think that ability to "delete" own account is very important, but I have different idea.
What about not actually deleting user from database but only changing name to "Account Deleted" and setting account to blocked? I would be much more happy with that.

What do you think? Maybe someone could create a patch or new module with this functionality for Drupal 6 ?

gonzalez_ea’s picture

subscribe

design.er’s picture

Hi,

i tested the new patch ("port_6_4.patch" from comment #7) and get the following error, when tried to navigate to admin/user/user delete:

Fatal error: require_once() [function.require]: Failed opening required 'sites/all/modules/user_delete/user_delete.admin.inc' (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\mysite.com\includes\menu.inc on line 346

It seems that the module looks for the user_delete.admin.inc that does not exist.

Have anybody the same error or have ideas how to patch it?
Unfortunately I'm not a coder. But I would like to support with testing the patches and reporting bugs.

The user delete function itself seems to work fine with the new patch.

Regards,
Stefan

davidseth’s picture

Issue tags: +user delete

Hello,

That patch does not contain a user_delete.admin.inc. Can you re-roll it?

Thanks,

David

davidseth’s picture

A potential way forward. I have created an issue: http://drupal.org/node/391582

I have done a number of modifications to the code (6.x) and am asking for co-maintainership.

Please check out the new ticket and see what you think. If you have any thoughts are suggestions add them to http://drupal.org/node/391582 or create a new Issue for feature requests.

Cheers,

David

marquardt’s picture

Version: 5.x-1.x-dev » 5.x-1.0
StatusFileSize
new3.76 KB

Here's a re-roll of the patch in #7. It applies cleanly (I hope) against the last released version of this module.

freddyseubert’s picture

yeah this one applies cleanly, but there is still the same error as mentioned in #13..

askibinski’s picture

StatusFileSize
new60.83 KB

As described on the module page, the way this module works is all user generated content keeps existing under the 'anonymous' account.
I think it would be a lot better to have a choice in what to do with existing user nodes/comments, like the way this is implemented in Drupal 7. (see attached screenshot)

Are there any plans to extend this module's functionality this way?

The way I see it, there is no site-administrator-friendly way (in drupal 6) to delete all user nodes and content for a certain user.

wilton.pinheiro’s picture

Stefan,

I believe they've missed this " '#submit' => array('user_edit_delete_submit')," on the form_alter. For me works now.

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'),
);
}
}

Cheers,
Wilton

christefano’s picture

Status: Needs review » Needs work
DavidWhite’s picture

Status: Needs review » Needs work

Out of curiosity, as there are obviously people who are using this, why not just port this module over to Drupal 6? I realize that's what's happening already, but what's so hard about releasing a 6.x version? Couldn't you, in theory, simply run this patch, and then issue it as a Drupal 6.x module?

I'm fairly new to Drupal (although I'm learning fast), and I'm even more new to patching, but am I missing something obvious?

At any rate, if no one feels like editing that one line of code that Wilton made, I've uploaded the file. It works for me after the fix that Wilton made, other than the following:

I put the patch file (provided in comment #16) into the /user_delete directory, and ran the patch. It told me that it couldn't find user_delete.info or user_delete.module - so I typed those in manually. At the end of the patch, it says this:

patch: **** malformed patch at line 114: /**

Why don't I see a user_delete.admin.inc file in this patch? I thought that it was supposed to be included.

After the patch failed, I went in and edited the code manually. This is what I've got in my user_delete.module file after editing the code manually, but I still don't see the link on the User Account to Delete the account. Isn't there supposed to be a tab/link added for this?

(I Removed the Code)

- David

DavidWhite’s picture

Nevermind, with the help of my colleague, I got this working. I'll put what I did into a new patch file and upload it shortly for the community's benefit. It's working perfectly now!!

- David

design.er’s picture

Cool, I'll gladly help testing to bring this forward. :)

DavidWhite’s picture

Status: Needs work » Needs review
StatusFileSize
new6.86 KB

Ok, I'm changing the status to this thread to "Needs Review." I had to hand code part of this patch file after creating it, so please test and let me know. It should create the file "user_delete.admin.inc" now. I'm not really in a good place to be able to test this right now.

This patch should be place into the /sites/all/modules/user_delete directory before being applied.

- David

christefano’s picture

Category: feature » task
Status: Needs work » Reviewed & tested by the community

The patch at #24 applies cleanly. I don't know what's going on with the change of maintainership request (#391582), but this D6 version is good to go.

sanduhrs’s picture

Version: 5.x-1.0 » 6.x-1.0
Assigned: Unassigned » sanduhrs
Status: Reviewed & tested by the community » Fixed

Slightly changed patch in #24, commited and released D6 Version.
Please test and report back.

Thanks.

design.er’s picture

I tested the patch from #24 and it works great for me.
I can delete my account as user (set the permissions) and the redirection to the URL (I've set in the settings) after the account was deleted works absolutely fine. *thumbsUp*

Status: Fixed » Closed (fixed)
Issue tags: -user delete

Automatically closed -- issue fixed for 2 weeks with no activity.