function invite_withdraw_access in Invite 7.2
Same name and namespace in other branches
- 7.4 invite.module \invite_withdraw_access()
Access callback for withdraw confirmation form.
Parameters
$invite: The invitations to be withdrawn.
1 string reference to 'invite_withdraw_access'
- invite_menu in ./
invite.module - Implements hook_menu().
File
- ./
invite.module, line 336 - Allows your users to send and track invitations to join your site.
Code
function invite_withdraw_access($invite) {
global $user;
if (!$invite->joined) {
$permission = 'withdraw own invitations';
}
else {
$permission = 'withdraw own accepted invitations';
}
if ($invite->uid == $user->uid && user_access($permission) || user_access('administer invitations')) {
return TRUE;
}
else {
return FALSE;
}
}