Out of the box it doesn't seem like this module allows the invitee to withdraw/cancel an invite. However, if you are sent an invite you are displayed a status message to either accept or withdraw it which is a bit of a contradiction in code.
When clicking on 'withdraw' from the invitee account I get access denied along with the following status message:
The invitation has already been withdrawn
The invite status is still indeed valid and has not already been withdrawn which is 1 bug. When looking at invite_withdraw_access in invite.module the following code should be changed to remedy this message.
Change
if ($invite->status = INVITE_WITHDRAWN) {
To
if ($invite->status == INVITE_WITHDRAWN) {
To fix the access denied when trying to withdraw an invite from the invitee's account the following change should be made.
Change
if (($invite->uid == $user->uid && user_access($permission)) || user_access('administer invitations')) {
To
if ((($invite->uid == $user->uid || $invite->invitee == $user->uid) && user_access($permission)) || user_access('administer invitations')) {
Patch is attached
| Comment | File | Size | Author |
|---|---|---|---|
| 0001-Allow-invitee-to-withdraw-invite.patch | 886 bytes | Sylense |
Comments
Comment #2
Sylense commentedComment #3
SpartyDan commentedThe first bug is an instance where
(INVITE_WITHDRAWN = $invite->status)
would have thrown an error during development and not become a bug.
This patch, 0001-Allow-invitee-to-withdraw-invite.patch, fixes that bug.
The second bug is also fixed by this patch.
Thank you for finding and submitting a patch to fix these bugs.
Changing status to RTBC
Comment #4
SpartyDan commentedCommitted to 7.x-4.x