Patch (to be ported)
Project:
Signup
Version:
6.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Jun 2008 at 12:09 UTC
Updated:
29 Dec 2010 at 16:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
dwwNot possible through the UI.
I'd only implement something like this as a separate module, since there's no way I'd want to bloat the main signup module with something like this.
Luckily, there are hooks invoked whenever a user signs-up or cancels, so it should be pretty easy to implement this in another module.
Comment #2
giorgio79 commentedIf the module would expose an event to Rules, assigning a role would be a piece of cake with that module. :)
Any plans for that?
Comment #3
ezra-g commentedI marked #812040: Role assignment to a user once the "Mark signup attended" action is fired. as a duplicate of this. In that issue, I mistakenly reported that we have actions/trigger integration for when a signup is created.
In general, this seems like a pretty common feature. #901678: Assign role to signed up users is a request for it as well.
I see two ways of approaching this feature:
A) With Actions: We could add a trigger for when a signup is created/cancelled and fix up http://drupal.org/project/user_role_actions so that it actually works.
B) Add a configurable option to Signup allowing admins to specify which role(s) should be granted/removed upon signup creation/cancellation. We could make this drupal_alterable with the $node and $account objects, so other modules can alter the way this works based on things like existing user roles or specific nids (or anything else). I see this setting being site-wide initally, though we could later make it nid or node type specific to facilitate a separation between "regular" events and "special" ones that should result in a role being created.
Comment #4
ezra-g commentedHere's a super simple signup_roles module that should live in signup/modules :) .
Comment #5
ezra-g commentedComment #6
gregglesThis mostly looks good to me.
There was a typo in the variable name in the form vs. the variable_gets. I've made this consistent.
It doesn't make sense to show "authenticated user" role as one that can be granted, and this didn't provide good help text if there weren't any roles beyond authenticated. So...I fixed that.
There was some trailing whitespace that my editor removed.
The attached patch was created from a locally created git repository, so it should apply, but maybe not...
Looks great to me!
After committing this, I suggest creating a component for it in this issue queue so that feature requests/bugs can be filed appropriately. One obvious feature seems like making this work on a per-event basis (i.e. the configuration for it would be shown on the node and stored per node, rather than being site wide). This does meet a good basic use case, though, so it seems worth adding in its current form.
Comment #7
ezra-g commentedGreat points, thanks.
I've re-uploaded the module with changes by greggles and tested.
I think this is RTBC but would love to get another +1 first.
Comment #8
sarahjean commentedHi, I'm using Ubercart and the signup integration module on my signup site, to charge for registrations.
I installed and tested out the signup_roles_1.zip module and choose one of the custom roles on my test site on the admin/settings/signup page.
I tried it out, (added event to cart and checked out) and I am getting an error:
warning: Invalid argument supplied for foreach() in /sitepath/sites/all/modules/uc_signup/uc_signup.module on line 661.
The role that I choose doesn't get applied to the users who signed up/were signed up by other users.
Here's some of my site specs:
Drupal core 6.19
Conference Organizing Distribution Support Modules 6.x-1.0-alpha1
Signup 6.x-1.0-rc6
Signup Integration for Ubercart 6.x-1.0-beta5
Ubercart 6.x-2.4
Also, on a separate note, I realize this may be a future development thing, but are there plans for the role that is applied to vary based on what event was signed up for?
Thanks for working on this feature!
Comment #9
greggles@slavalle, that sounds more like #585656: hook_requirements to notify users to create profile fields.
Comment #10
coltraneI've reviewed the code and tested the module and it looks great.
Comment #11
ezra-g commentedThanks for the reviews! This is committed.
http://drupal.org/cvs?commit=436184
Comment #12
ezra-g commentedComment #14
ezra-g commented