Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#9 | delete_multiple_users_7.patch | 1.14 KB | edmund.kwok |
#8 | delete_multiple_users_6.patch | 1.87 KB | edmund.kwok |
#7 | delete_multiple_users_5.patch | 868 bytes | edmund.kwok |
#6 | delete_multiple_users_4.patch | 952 bytes | edmund.kwok |
#4 | delete_multiple_users_3.patch | 712 bytes | edmund.kwok |
Comments
Comment #1
edmund.kwok CreditAttribution: edmund.kwok commentedReplicated this issue, can't delete multiple users.
Comment #2
edmund.kwok CreditAttribution: edmund.kwok commentedPatch moves deletion check to admin page callback instead of the form generation function.
Comment #3
edmund.kwok CreditAttribution: edmund.kwok commentedWhoops, forgotten to remove changes that was supposed to be in a different issue.
Comment #4
edmund.kwok CreditAttribution: edmund.kwok commentedDarn, another mistake with the patch. Gotta get used to creating proper patches!
Comment #5
Heine CreditAttribution: Heine commentedI've tested the patch in #4; it doesn't solve the issue.
Comment #6
edmund.kwok CreditAttribution: edmund.kwok commentedOkay lets try that again..
Comment #7
edmund.kwok CreditAttribution: edmund.kwok commentedPatch cleaner now, used --unified instead of --context
Comment #8
edmund.kwok CreditAttribution: edmund.kwok commentedRerolled againts HEAD. Changes:
1. Add confirm delete to $output instead of returning form straight.
2. Changed placeholders in user_delete message to ! from %
Comment #9
edmund.kwok CreditAttribution: edmund.kwok commentedMy 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.
Comment #10
AjK CreditAttribution: AjK commentedRe-created problem / bug.
Applied patch in #9 and can confirm works fine for me. Results as expected.
regards,
--AjK
Comment #11
edmund.kwok CreditAttribution: edmund.kwok commentedSo 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?
Comment #12
AjK CreditAttribution: AjK commentedmaybe 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
Comment #13
AjK CreditAttribution: AjK commentedFollowing 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
Comment #14
edmund.kwok CreditAttribution: edmund.kwok commentedThis 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?
Comment #15
AjK CreditAttribution: AjK commentedYep, I'd say RTBC. But can the status be changed to RTBC with just a single review?
regards,
--AjK
Comment #16
AjK CreditAttribution: AjK commentedComment #17
drummCommitted to HEAD.
Comment #18
(not verified) CreditAttribution: commented