function invite_resend_access in Invite 7.4
Access callback for resend invitation.
Parameters
Invite $invite: The invitations to be resent.
Return value
bool Is user have access or no.
1 string reference to 'invite_resend_access'
- invite_menu in ./
invite.module - Implements hook_menu().
File
- ./
invite.module, line 445
Code
function invite_resend_access($invite) {
global $user;
$is_valid = $invite->joined == 0 && $invite->canceled == 0;
$access_own = user_access('resend own invitations') && $invite->uid == $user->uid;
$access_any = user_access('resend any invitations');
$is_expired = $invite->expiry < REQUEST_TIME || user_access('resend unexpired invitations');
return $is_valid && $is_expired && ($access_own || $access_any);
}