Cancel User account module for Drupal 6.x

meenakshi - May 8, 2009 - 06:02

I am looking for "Cancel user account" module for drupal 6.x. Pls let me know where can I get it?

Is it that you want users to

marquardt - May 8, 2009 - 08:43

Is it that you want users to be able to cancel their own account? AFAIK, this functionality will be in Drupal 7. For the time being, there's a module named user_delete, but a release is only available for Drupal 5. There's a patch for D6, though. I have not tried it. Also see this discussion.

Or are you looking at a functionality to cancel a user account from the admin side? That you can do without added modules; simply go to Administer -> User management -> Users (/admin/user/user), select the users you want to delete (or block), and select the appropriate action from the "Update options" drop down (and click Update, of course).

Yes, I want user to cancel

meenakshi - May 8, 2009 - 10:49

Yes, I want user to cancel their own account. I have seen user_delete module, It supports only for Drupal 5. I am newbie to drupal. Pls tell me how to install that patch for D6.x?

Do you have access to a Unix

marquardt - May 8, 2009 - 11:57

Do you have access to a Unix command line environment? If so:

  1. Download the original released package and the patch from the issue queue (e.g., the patch from this comment). Let's assume you named the downloaded path something like user_delete_port_6.patch.
  2. This step is very unusual - it's only required to work with that particular patch, which probably should be rerolled so that it applies cleanly IMHO!
    Edit the downloaded patch and remove line 15 (the one saying \ No newline at end of file).
  3. Unpack the released version of the module (which will create a new subdirectory named user_delete):
    tar -xvzf user_delete-5.x-1.0.tar.gz
  4. Change into that directory:
    cd user_delete
  5. Apply the patch:
    patch < ../user_delete_port_6.patch

    This should give the following output:
    patching file user_delete.info
    Hunk #1 succeeded at 1 with fuzz 2.
    patching file user_delete.module

    which tells you that the patch was applied successfully, but one of the line numbers was off by 2 or so when applying the patch to the file user_delete.info (again a consequence of the way the patch was created in the first place). You don't have to worry about this message in this particular case.
  6. Install that patched version in your Drupal site.

Note that step number 2 is highly unusual; in most cases, patches can be applied without fuzzing around with them. Also note that I have not tried if the patch works or provides the promised functionality; that testing you'll have to do by yourself (and ideally, report back to the issue queue if it worked or not).

Hope this helps.

Thanks marquardt for quick

meenakshi - May 8, 2009 - 12:16

Thanks marquardt for quick reply. We have Drupal on windows os. How can i do above steps using windows?

Umpf. Maybe the links in this

marquardt - May 8, 2009 - 12:41

Umpf. Maybe the links in this discussion thread help: http://drupal.org/node/23844. Do you have access to a Mac OSX machine? That's also a Unix variant...

Hi Marquardt , I have manage

meenakshi - May 8, 2009 - 13:18

Hi Marquardt ,
I have manage to install the patch n user_delete module.Now it showing "Delete" tab in user profile. :)
Thanks for your help...!

Great;-)) !!

marquardt - May 8, 2009 - 14:32

Great;-)) !!

Ok, I've re-rolled that

marquardt - May 8, 2009 - 12:11

Ok, I've re-rolled that patch... download it from http://drupal.org/node/333460#comment-1566664. The sequence for patching is now

  1. Download the original released package and the patch from the issue queue.
  2. Unpack the released version of the module (which will create a new subdirectory named user_delete):
    tar -xvzf user_delete-5.x-1.0.tar.gz
  3. Change into that directory:
    cd user_delete
  4. Apply the patch:
    patch < ../user_delete_port_6.patch

    This should apply with the following output:
    patching file user_delete.info
    patching file user_delete.module

    which really tells you everything went fine.
  5. Install that patched version in your Drupal site.

Again, I have not tested what the patch is actually doing; I just re-applied the patch so that using it is a bit more straightforward than in case of the original patch.

Good luck!

 
 

Drupal is a registered trademark of Dries Buytaert.