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.
You have many users blocked by spam? hundreds, thousands?
This small module will allow you to delete them all at once.
You can also do it with drush.
Delete all users block.
------------------
'drush del_block_user' o with alias 'drush dbu'
Delete all users block with argument (no delete de user con uids).
-------------------------------------------------------
drush dbu 4,5,8
https://drupal.org/sandbox/lgrtm/2074157
Similar projects.
Logintoboggan
https://drupal.org/project/logintoboggan
Delete all
https://drupal.org/project/delete_all
Comment | File | Size | Author |
---|---|---|---|
#22 | del_block_user-grammar_fixes-2085833-22.patch | 4.41 KB | coredumperror |
Comments
Comment #0.0
Anonymous (not verified) CreditAttribution: Anonymous commentedUpload Pics and info.
Comment #1
PA robot CreditAttribution: PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
jlbellidoIt seems that the default branch is 7.x but if we check the project with Ventral (http://pareview.sh/pareview/httpgitdrupalorgsandboxlgrtm2074157git) :
"There is still a master branch, make sure to set the correct default branch: http://drupal.org/node/1659588 . Then remove the master branch, see also step 6 and 7 in http://drupal.org/node/1127732 "
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedOk, thk for reply and tip!
I remove the master branch and test in pareview.
All ok!.
Have you found any error or it's all right?
Thk.
Bye
Comment #4
Vik CreditAttribution: Vik commentedFILE: del_block_users.module
--------------------------------------------------------------------------------
FOUND 9 ERROR(S) AND 2 WARNING(S) AFFECTING 9 LINE(S)
--------------------------------------------------------------------------------
57 | ERROR | Functions must not contain multiple empty lines in a row; found
| | 2 empty lines
60 | ERROR | Comment indentation error, expected only 1 spaces
64 | WARNING | There must be no blank line following an inline comment
65 | ERROR | Functions must not contain multiple empty lines in a row; found
| | 2 empty lines
68 | WARNING | There must be no blank line following an inline comment
68 | ERROR | No space before comment text; expected "// =
| | array_diff_assoc($users, $usersexclude);" but found "//=
| | array_diff_assoc($users, $usersexclude);"
68 | ERROR | Comments may not appear after statements.
78 | ERROR | No space before comment text; expected "// dpm($users);" but
| | found "//dpm($users);"
79 | ERROR | No space before comment text; expected "// dpm($usersexclude);"
| | but found "//dpm($usersexclude);"
80 | ERROR | No space before comment text; expected "// dpm($users);" but
| | found "//dpm($users);"
96 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedHi Vik, thks for follow.
I checked with the new branch and it´s all ok.
It´s the last branch ?
Coder module
------------
SITES/ALL/MODULES/DEL_BLOCK_USERS/DEL_BLOCK_USERS.MODULE
del_block_users.module
No Problems Found
SITES/ALL/MODULES/DEL_BLOCK_USERS/DRUSH/DEL_BLOCK_USERS.DRUSH.INC
del_block_users.drush.inc
No Problems Found
git clone --branch 7.x-1.x lgrtm@git.drupal.org:sandbox/lgrtm/2074157.git del_block_users
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedNew status, sorry.
Comment #6.0
Anonymous (not verified) CreditAttribution: Anonymous commentedInfo review.
Comment #6.1
Anonymous (not verified) CreditAttribution: Anonymous commentedSimilar projects.
Comment #7
alexmoreno CreditAttribution: alexmoreno commentedthis module looks like it could work very nicely in combination with mine: https://drupal.org/node/2083831 :-)
Please, add instructions on how to clone your project: git clone http://git.drupal.org/sandbox/lgrtm/2074157.git del_block_users
Is the user in the README pointing to the wrong Drupal User? http://drupal.org/user/5546
The module installs correctly and works fine. Tested with a blocked user, selecting the user to avoid deletion and without selecting it works properly. The code is also well written and documented, nothing else to comment in that.
Help us with some reviews to accelerate your review process. You can help me too :-): https://drupal.org/node/2083831
Once done this, I think it could be ready :-).
Comment #8
bappa.sarkar CreditAttribution: bappa.sarkar commentedManual Review
1. The Erase Confirmation should be in separate form (Should work like confirm form)
2. You should explode and trim the uids in
replace with
3. To exclude users from delete list you have used
This is very time consuming. You can use below
4. To delete user you user foreach
This is again very time consuming. You can use below
All blocked users will be deleted in a single query.
5. I am feeling the exclude uid fiels title should be easy to understand in
it can be something like below
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedHi Vik, have you intented now ?
Thk.
Miguel.
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedHello Bappa.sarkar , thank you very much for your review. I learned from it.
I am new to this as my English :)
I am very happy with your proposal and help.
Now I get to it.
Thank you.
Greetings.
Comment #11
Anonymous (not verified) CreditAttribution: Anonymous commentedThk too to urwen for test this module, i can help with reviews too.
Bye !
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commentedApply changes proposal for comunity.
Thk.
PD. I need review info for task proposal -> 1. The Erase Confirmation should be in separate form (Should work like confirm form).
Comment #13
swim CreditAttribution: swim commentedHey lgrtm,
I'll just do a quick review with your FAPI implementations.
In del_block_users.module line 10, function del_block_users_form_alter;
Have a look at hook_form_FORM_ID_alter as your only targeting a single form.
So something like;
Lastly your CSS can be attached to your form like so.
Just a suggestion but consider adding a validation function.
Cheers,
Comment #14
swim CreditAttribution: swim commentedUpdated status.
Comment #15
Anonymous (not verified) CreditAttribution: Anonymous commentedHi all, i renew code and inmplement validation in the field.
Clarify instructions in readme for clone it.
Thk
Cheers.
Comment #16
gaurav.pahuja CreditAttribution: gaurav.pahuja commentedModule working fine for me.
Here is one monor comment:
Please add dt function for 'description' string inside hook_drush_command
Comment #16.0
gaurav.pahuja CreditAttribution: gaurav.pahuja commentedCancel similar project, only D6.
Comment #17
iamrasec CreditAttribution: iamrasec commentedModule seems to be working fine on my tests also. Just curious though, what is that "checkbox," file in your module? I'm thinking it was included there by accident?
Comment #18
Anonymous (not verified) CreditAttribution: Anonymous commentedThk iamrasec!
Ah sorry all, i new with git and how i see i have more commits for a little coder here.
I starting with any problem with it.
I will erase it.
Thk.
PD. i have the confirm form prepared but now i dont have validate.
This night i uploader for helpme!!!
Thk
Cheers.
Comment #19
iamrasec CreditAttribution: iamrasec commentedUnderstandable. I too am new to git also. Anyway, you don't seem to have any problems here also: http://pareview.sh/pareview/httpgitdrupalorgsandboxlgrtm2074157
So other than that rogue file, this module seems to be good to go.
Comment #20
Enxebre CreditAttribution: Enxebre commentedHi,
manual review:
1 - In file "del_block_users.module", line 40
current_path() . '/del_block_users.css';
is returning "admin/people/del_block_users.css"
I think this is what you are looking for:
drupal_get_path('module', 'del_block_users') . '/del_block_users.css';
2 - As iamrasec says there is a file calle checkbox.
3 - In your submit function You could considering to add a "where clause" to the query instead of retrieving unuseful elements and then make an "array_diff" which probably will become in a poorer perfomance.
4 - Doctumentation says:
Note: in 90% of select query use cases you will have a static query. If in a critical performance path, you should use db_query() and friends instead of db_select() for performance reasons. Only use dynamic queries if the query parts vary (example: adding WHERE conditions depending on the context) or if they should be alterable
https://drupal.org/node/310075
5 - When I execute some drush command with an invalid argument ("drush cc asdasdad" or "drush vget asgdjagdjagsj") I have the next message:
"Delete all block users in site, caution for manual block user. You can select uid for no delete."
Hope this help.
Regards.
Comment #21
Anonymous (not verified) CreditAttribution: Anonymous commentedVery thk for great review and help, i will check all points.
Regards.
Comment #22
coredumperror CreditAttribution: coredumperror commentedThis looks like a nice, straightforward module for removing all those pesky auto-blocked users. However, there are several confusing grammar errors in this module, most seriously in the title itself.
From what I can tell, this module should be called "Delete Blocked Users". Without that "ed", the module's name sounds like it's related to Drupal's Block system (the
admin/structure/block
page), rather than to blocked user accounts. This is a common conjugation mistake for ESL users, so don't feel bad. :)I've also included a patch that fixes up the grammar of all the user-visible strings in the module. My patch doesn't change the name of the module, though, because the name is so closely tied to the file and function names. That would be a really significant change that I figured should be done by lgrtm, if he decides to do so.
Additionally, my patch tweaks the
del_block_users_validate()
to be more robust. It now supports whitespace between the comma-separated numbers, and has a slightly more readable regex.Comment #23
Anonymous (not verified) CreditAttribution: Anonymous commentedHi all people, sorry for this long time with no update.
Now i have a few time for continue with this.
Very thk coredumperro for feedback !!! Is a clearly condition in the name of module, i will change it.
This week i test it and modify it.
Bye and greets !
Comment #23.0
Anonymous (not verified) CreditAttribution: Anonymous commentedNew similiar module.
Comment #24
PA robot CreditAttribution: PA robot commentedClosing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.