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

ulf1’s picture

Assigned: Unassigned » ulf1

> 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

levonai’s picture

Thanks 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!

ulf1’s picture

Status: Active » Closed (fixed)

I 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

ulf1’s picture

Status: Closed (fixed) » Fixed

I fixed the logic error for the next dev release.

~
Ulf

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.