From /admin/user/user select a bunch of users, change dropdown to "delete the selected users", and hit update. The page reloads, with no error messages, and the users intact.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

edmund.kwok’s picture

Replicated this issue, can't delete multiple users.

edmund.kwok’s picture

Priority: Normal » Critical
Status: Active » Needs review
FileSize
898 bytes

Patch moves deletion check to admin page callback instead of the form generation function.

edmund.kwok’s picture

FileSize
714 bytes

Whoops, forgotten to remove changes that was supposed to be in a different issue.

edmund.kwok’s picture

FileSize
712 bytes

Darn, another mistake with the patch. Gotta get used to creating proper patches!

Heine’s picture

Status: Needs review » Needs work

I've tested the patch in #4; it doesn't solve the issue.

edmund.kwok’s picture

FileSize
952 bytes

Okay lets try that again..

edmund.kwok’s picture

Status: Needs work » Needs review
FileSize
868 bytes

Patch cleaner now, used --unified instead of --context

edmund.kwok’s picture

Rerolled againts HEAD. Changes:

1. Add confirm delete to $output instead of returning form straight.
2. Changed placeholders in user_delete message to ! from %

edmund.kwok’s picture

My bad, should not have changed placeholders from % to !.

When deleting users with PHP 4.4.2, it returns a blank screen or warning: array_walk(): Unable to call () - function does not exist in /Users/edmund/Documents/htdocs/cvs/drupal/includes/common.inc on line 636. Either none of the users get deleted, or only one gets deleted.

I added added a watchdog message to see what's going on in user_multiple_delete_confirm_submit. When I tried deleting two users, user_multiple_delete_confirm_submit was called once, sending the $edit['accounts'] object. In the foreach loop, the user was deleted. But the loop did not goto the next user, instead user_multiple_delete_confirm_submit was called again with the same $edit['accounts'] object and in the foreach loop, the deleted user's uid was passed to user_delete once again. Since the user was already deleted, that function failed and think that leads to the blank screen.

Works alrite with PHP 5. Seperate issue perhaps. Changing the placeholder from % to @ makes the problem disapear, but that is not a proper solution.

Meanwhile, still need reviewers.

AjK’s picture

Re-created problem / bug.

Applied patch in #9 and can confirm works fine for me. Results as expected.

regards,
--AjK

edmund.kwok’s picture

So user deletion works but the bug can be reproduced? Issue has been seperated to http://drupal.org/node/82524. Where do we go from here?

AjK’s picture

maybe my review was unclear. I setup my system to be able to reproduce the bug. Then, I applied the patch in #9 and this fixed it (for me at least). So, my review is positive in confirming the patch appeared to fix the problem.

regards,
--AjK

AjK’s picture

Following on to #82524 I have to say I test with PHP5.1.4 and MySQL 5.1.8

#82524 suggests that PHP4 users still have a problem but is that problem related to this issue/patch ? If not, then this patch can go forwards. I'll try to get a PHP4 test system set up to look at #82524 later today.

regards,
--AjK

edmund.kwok’s picture

This patch brings out the problem as highlighted in #82524 but it still fixes this issue of deleting users from the admin page. I'd say rtbc?

AjK’s picture

Yep, I'd say RTBC. But can the status be changed to RTBC with just a single review?

regards,
--AjK

AjK’s picture

Status: Needs review » Reviewed & tested by the community
drumm’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)