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.
I've found that the setting of the "Require administrator approval for invitees" checkbox on the admin/config/people/invite page is ignored when users register. I've added a bit of logic to the hook_user_presave() implementation to check the value of this variable, and set the new user's status accordingly.
Comment | File | Size | Author |
---|---|---|---|
#2 | respect-invite-require-approval-2600164-1.patch | 420 bytes | spiderman |
Comments
Comment #2
spidermanComment #3
ckngComment #4
jacob.embree CreditAttribution: jacob.embree at St. Louis Integration commentedThis option may not be useful at all. The option to require approval is at admin/config/people/accounts. If the user configuration page requires users to get admin approval then the checkbox at admin/config/people/invite is redundant. When only administrators can create accounts the accept link gets you a 403. When visitors may register there's no reason to make invitations a special case, requiring approval for invited users only. When only invited users may register admin approval is already required.
If a maintainer agrees with me I'll submit a patch to remove the option.
Comment #5
suffering drupal CreditAttribution: suffering drupal commentedWhat do you mean "not useful"? VERY USEFUL if it worked.
We do NOT want just anyone to sign up (no sign up form for anonymous users)
But we DO want to to make it as fluently as possible for invited people. So without needing approval!
That's the whole reason of being invited.
In fact, without this option, it's the module in itself that makes no sense.
"The option to require approval is at admin/config/people/accounts."
and the only option that gives sense to "invite by email" would in fact be
New user registration by invitation only, free from administrator approval.
Absolutely not redundant.
So after this bit of user-logic and friendliness...
I didn't try "Invite" by itself. But if the Require approval works there, isn't it simply "Invite by mail" that overlooks it?
Or else add the option I mentioned above to make invite by mail useful.
I am scared of patches, but will have a look at this one.
Comment #6
codingleechallenged CreditAttribution: codingleechallenged as a volunteer commentedpatch works for me.
thank you.
Comment #7
renatogIt really makes sense and works good (but as Feature request)
Comment #9
renatogCommitted to the dev branch
@jacob.embree, if you have a better idea about it please attach one patch with your suggestion (usually your solutions are veery good)
Thanks for contribution guys.
Best,