invite module is providing option to assign role when invited user gets registered when Auto Assign Role is enabled.
But it would be nice make to protect assign path so that only invited user gets assigned that instead of anybody who know the path gets the role assigned.
Also there is a https://www.drupal.org/project/protected_pages module which could be used to protect pages but don't how that works with this module.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | autoassignrole-role_by_path_invite-2425799-4.patch | 1.13 KB | pramod_patil |
Comments
Comment #1
Sylense commentedI know this is somewhat old but for anyone looking for a solution to this I managed to implement something relatively simple for this. You can use hook_form_alter() and simply check for $_SESSION for the invite code. If it's not set, just redirect them to the normal register page.
Comment #2
mike.davis commentedHi @Sylense,
Thanks for your comments on this thread and welcome any patches to help deal with this issue.
Thanks
Mike
Comment #3
pramod_patil commentedComment #4
pramod_patil commentedAdded patch for this fix. Please review.