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.
Not sure if this is intended behavior or not, but in rsvp_add_guests_form_submit i have two questions about $send_immediatly
1. How come it is being set by not(_rsvp_visible_guestlist_access)? what is the logic behind this?
2. It looks like the if should be != (as opposed to ==) in 2242?
if($send_immediatly == true) {
drupal_set_message(t('New guests have been added. Do not forget to send the invitation.'));
}
Thanks in advance!
Comments
Comment #1
ulf1 CreditAttribution: ulf1 commented> 1. How come it is being set by not(_rsvp_visible_guestlist_access)? what is the logic behind this?
Function _rsvp_visible_guestlist_access determines if the user that adds the guests has permissions to view the guest list. This is important in the context of send immediately because the "send invitations" link is part of the guest list and if the user can not acces the guest list he can not send the invitations. So the logic is this: "If the user has no access to the guest list at this time, then send the invitation to newly added guests immediatly".
>2. It looks like the if should be != (as opposed to ==) in 2242?
This is a bug and should be != . Good catch.
I will update the code soon.
Thanks,
Ulf
Comment #2
levonai CreditAttribution: levonai commentedThanks for the detailed explanation.
The use case that i was expecting is the simple case of a user creating an RSVP, adding guests and the invites are sent automatically once the guets are added, without the need for an extra step by the user.
It seems to me that this hould be the default use case, unless i'm missing something?
thanks!
Comment #3
ulf1 CreditAttribution: ulf1 commentedI decided that it is not worth the effort to add a configuration entry to decide if the module should send out invitations immediately or not. In theory it is only one additional click.
First you select all Guests that you want to invite, and then you send the invitations to all of them at the same time.
If you like to send the emails immediately, just set $send_immediately to true.
Thanks,
Ulf
Comment #4
ulf1 CreditAttribution: ulf1 commentedI fixed the logic error for the next dev release.
~
Ulf