Needs work
Project:
Signup
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
15 Nov 2010 at 14:51 UTC
Updated:
3 May 2011 at 18:31 UTC
Jump to comment: Most recent file
I use Signup to allow users to signup to event nodes. People sometimes forgets to add their signup and the administrator have to add these afterwards. But, in order to do that the signup has to bee open.
I want a setting to allow administrators to add users even if the signup is closed.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | signup_admin-add-users-after-signup-closed-972254.patch | 2.95 KB | mstef |
| #1 | signup-addusers2closed.patch | 2.08 KB | magnus |
Comments
Comment #1
magnus commentedAnd here is a patch to implement this. Please also review:
#242720: Mass/bulk user signup
#595414: Add rules event for signup
Comment #2
magnus commentedComment #3
MasterChief commentedHi magnus, i applied the patch but sadly it doesn't change anything.
The add link doesn't show up when signup are closed, is it the same for you ?
Comment #4
magnus commentedThe setting is under the "advanced settings" at /admin/settings/signup
Comment #5
MasterChief commentedOops, i missed it, it works now :)
Thank you very much!
Comment #6
magnus commentedSomeone, please review the patch and set the status of the issue. I have been using this for a long time, but I don't want to set the issue to RTBC myself.
Comment #7
MasterChief commentedIt works well :)
Comment #8
magnus commentedThanks MasterChief! =)
Comment #9
mstef commented1. You can't name a variable "signup_addusers2closed"
2. Booleans must always be in caps (FALSE, not false)
3. You never included the change to hook_uninstall to remove this new variable
4. In signup_sign_up_user(), I'd feel way more comfortable adding an additional argument to mark that an admin is performing the action, rather than just checking this variable every single time (because once it's set on, then $node->signup_status becomes completely irrelevant, and this check shouldn't be made on every hit).
Comment #10
mstef commentedUpdated patch:
1. Renamed the variable.
2. Used 0 as a default instead of FALSE, as checkboxes use numeric booleans.
3. I saw that the maintainer used to not-recommended approach of querying the variable table to fetch the variable names. This is frowned upon for obvious reasons, but I'm not fixing it as it's out of scope for this patch.
4. signup_form() will now include the $signup_type as a form value, which is passed into the first argument for signup_sign_up_user(). If it's set to 'admin', it will check the variable we've created to allow the add. This module really should be using constants to define the values for things like $signup_type, but again, it's out of scope (and there are a lot of things that need to be fixed, so why get started now?).