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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Magnus’s picture

Status: Active » Needs review
FileSize
2.08 KB

And here is a patch to implement this. Please also review:
#242720: Mass/bulk user signup
#595414: Add rules event for signup

Magnus’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
MasterChief’s picture

Hi 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 ?

Magnus’s picture

The setting is under the "advanced settings" at /admin/settings/signup

MasterChief’s picture

Oops, i missed it, it works now :)

Thank you very much!

Magnus’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev

Someone, 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.

MasterChief’s picture

Status: Needs review » Reviewed & tested by the community

It works well :)

Magnus’s picture

Thanks MasterChief! =)

mstef’s picture

Status: Reviewed & tested by the community » Needs work

1. 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).

mstef’s picture

Updated 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?).