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.
Thanks for the module Subuser!
How does one delete a subuser without any confirmation to the subuser and how to select the action details, like: delete or block user, delete contents or not?
Kind regards
Comment | File | Size | Author |
---|---|---|---|
#7 | howto_delete_subuser-2502899-7.patch | 3.67 KB | Snehal Brahmbhatt |
Comments
Comment #1
Snehal Brahmbhatt CreditAttribution: Snehal Brahmbhatt at AddWeb Solution Pvt. Ltd. commented1. How does one delete a subuser without any confirmation to the subuser.
>> You can disabled account disabled email from "Home » Administration » Configuration » People" (i.e. /user#overlay=admin/config/people/accounts) under "Email" section, click on "Account blocked" and untick checkbox "Notify user when account is blocked."
2. How to select the action details, like: delete or block user, delete contents or not?
>> Please find attached patch named "howto_delete_subuser-2502899-1.patch" for the same.
Let me know if any query/concern regarding this.
Thanks,
Snehal Brahmbhatt | AddWeb Solution
https://www.drupal.org/user/3147795/track
Comment #2
Snehal Brahmbhatt CreditAttribution: Snehal Brahmbhatt at AddWeb Solution Pvt. Ltd. commentedComment #3
Snehal Brahmbhatt CreditAttribution: Snehal Brahmbhatt at AddWeb Solution Pvt. Ltd. commentedPlease find the patch howto_delete_subuser-2502899-3.patch for your purpose.
Hope this works for you flawlessly!
Thanks,
Snehal Brahmbhatt | AddWeb solution
https://www.drupal.org/user/3147795/track
Comment #4
saurabh.dhariwal CreditAttribution: saurabh.dhariwal at AddWeb Solution Pvt. Ltd. commentedComment #5
lauriiiThanks for working on this issue! Here's some feedback:
This should probably be configurable. We can't assume everyone wants this.
Missing space after if
Extra indentation
Comment #6
LeoVe CreditAttribution: LeoVe commentedSnehal,
Thanks for your info.
The case is that we are using the subuser module to delegate user maintenance to people, without giving them full access to user maintenance (that is the tab "People"). But restricted to just to their "own" subusers with the module.
Snehal, Laurii,
Thanks for the patches, I will try to implement and test it in the coming week.
I'm a bit late with my comment because of a holiday, sorry for that.
Kind regards,
Leo
Comment #7
Snehal Brahmbhatt CreditAttribution: Snehal Brahmbhatt at AddWeb Solution Pvt. Ltd. commentedLauri,
Please find the attached updated patch "howto_delete_subuser-2502899-7.patch" as per your given feedback.
Hope this work flawlessly for you!
Thanks,
Snehal Brahmbhatt | AddWeb Solution
https://www.drupal.org/user/3147795/track
Comment #8
lauriiiThanks for keeping to work on this one. I think we have to change the approach a little bit because it would be good to use Drupal's internal permission handling for this, instead of creating our own logic:
Comment #9
LeoVe CreditAttribution: LeoVe commentedSnehal,
The patch doesn't match the 7.x-2.x default module from version control and won't apply?
How to implement and test the patch from #7?
Thanks
Comment #10
jn2 CreditAttribution: jn2 as a volunteer commentedThe patch in #3 served my purposes - thanks very much! I don't need the configuration option.
However, what I can't fix is the email sent to the deleted user. The site regards this as a user deleting their own account, not a user deleted by an admin, and sends the Account cancelletion confirmation email. How can this email be disabled? Or how to get the site to regard the action as an admin deleting an account?
Comment #11
sdeathleader14 CreditAttribution: sdeathleader14 commentedHi, thanks for the patch #3 it solved my problem. i had the same problem that jn2 with "Account cancelletion confirmation email" so i edit the method "user_cancel_confirm_form_submit()" from "modules/user/user.pages.inc" and comment "_user_mail_notify", i know that is not a good solution but i solved it by now.
Greetings
Comment #12
krina.addweb CreditAttribution: krina.addweb at AddWeb Solution Pvt. Ltd. commentedComment #13
lauriiiThis still needs work, see: #8