Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
This is a VERY simple module that does only one thing:
Disables the option "Delete the account and its content." when cancelling a user account in the administration.
Project link: https://www.drupal.org/sandbox/alpe89/2852847
Git clone
git clone --branch 7.x-1.x https://git.drupal.org/sandbox/alpe89/2852847.git disable_delete_account_content
Comment | File | Size | Author |
---|---|---|---|
#12 | cancel_account.png | 62.8 KB | sjpagan |
#12 | admin_config_people_accounts.png | 82.26 KB | sjpagan |
#8 | Schermata 2017-02-15 alle 23.51.14.png | 210.51 KB | sjpagan |
Comments
Comment #2
jeetendrakumar CreditAttribution: jeetendrakumar as a volunteer and at HyTechPro.com commented@alpe89
Please update the git clone url for non-maintainer in issue summery page and fix errors reported by automated review tools.
https://pareview.sh/node/1102
Comment #3
alpe89 CreditAttribution: alpe89 commentedComment #4
alpe89 CreditAttribution: alpe89 commented@jeetendrakumar
Fixed:
- git clone url fixed
- indent changed to 2 spaces instead of tabs
- added file doc comment
- added function doc comment
- removed 'version' from .info file
- fixed "Line exceeds 80 characters; contains 89 characters" in README
Comment #5
alpe89 CreditAttribution: alpe89 commentedComment #6
alpe89 CreditAttribution: alpe89 commentedNew automated review: https://pareview.sh/node/1102
Comment #7
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 #8
sjpagan CreditAttribution: sjpagan commentedHi @alpe89,
Please fix this problem:
1) If set the option : Delete the account and its content. in Account Settings -> /admin/config/people/accounts , and try delete the account, the options disabled is preselected.
2) Specifies the utility of this module, a better solution would be to integrate a hook_permission () and not a form_alter()...
Comment #9
sjpagan CreditAttribution: sjpagan commentedComment #10
alpe89 CreditAttribution: alpe89 commented@sjpagan
I'm sorry I don't understand #1. Can you please explain it a bit more detailed?
And why is hook_permission better than form_alter in this scenario?
Comment #11
alpe89 CreditAttribution: alpe89 commentedSetting the status to 'Needs review' because I'm not sure what @sjpagan meant.
Comment #12
sjpagan CreditAttribution: sjpagan commentedHi @alpe89,
Follow the instruction as root:
1) Go to Account settings -> /admin/config/people/accounts img admin_config_people_accounts.png
2) Set Delete the account and its content. and save
3) Create new user
4) Select new user and cancel it
5) Whit your module is enable, The option 'Delete the account and its content.' is selected img cancel_account.img
Are you sure that it is correct?
Comment #13
sjpagan CreditAttribution: sjpagan commentedComment #14
alpe89 CreditAttribution: alpe89 commented@sjpagan
ah I see. I'm not sure what I could do about that though.
Doesn't seem like a big problem to me, but if you have any ideas how to "fix" it, I'm open
Comment #15
sjpagan CreditAttribution: sjpagan commentedHi @alpe89,
one little solution is:
Comment #16
alpe89 CreditAttribution: alpe89 commented@sjpagan
Good point.
I changed the code, and edited the title and screenshot in the project
Comment #17
shamas41@gmail.com CreditAttribution: shamas41@gmail.com as a volunteer commented@alpe89
Manual Review
Installed and tested your module.
So I can confirm it is working, after enabling your module this option is unset 'Delete the account and its content'
Suggestion:
But I think what you need to do is to have permissions in your module.
So say admin wants site managers to not to use this 'Delete the account and its content' option but wants to use this option himself. So he can just setup the permission and site managers will not see this option, but admin can still see/use this option
Automated Review
One minor issue in Automated Review
Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
But otherwise this module is working fine for me So. RTBC from my side
Comment #18
shamas41@gmail.com CreditAttribution: shamas41@gmail.com as a volunteer commentedComment #19
djalxs CreditAttribution: djalxs as a volunteer and commentedThis module does not have a sufficient amount of code for a proper review to gain full project promotion permissions.
I feel you could expand on this project somewhat to ensure there is enough code by writing a hook_help() and hook_permissions() implementation.
Looking at the code, the user settings page under admin > configuration will still allow the option to select deleting content automatically however I'm not in a position to test right now so all tips are from reading the code.
You may get this module approved as is but you will not get full access off this review so you would have to get another module reviewed for full access if this module isn't expanded somewhat.
Comment #20
alpe89 CreditAttribution: alpe89 commentedThanks for the feedback @shamas4 and @djalxs
Good points.
I have now updated the code to include a hook_permission() and hook_help()
so the user now needs a permission to have access to the option.
Comment #21
apadernoTo the reviewers: Please change back the priority to Normal after doing a review.
Comment #22
sleitner CreditAttribution: sleitner commentedAutomated Review
Review of the 7.x-1.x branch (commit be0c307):
This automated report was generated with PAReview.sh, your friendly project application review script.
Manual Review
The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.
This review uses the Project Application Review Template.
Comment #23
apadernoIf you are still working on this application, you should fix all known problems and set the status to Needs review. (See also the project application workflow.)
Please don't change status of this application if you aren't sure you have time to dedicate to this application, or it will be closed again as won't fix.
I am closing this application due to lack of activity.