function user_external_invite_resend_invites in User External Invite 7
Same name and namespace in other branches
- 7.2 user_external_invite.module \user_external_invite_resend_invites()
- 1.0.x user_external_invite.module \user_external_invite_resend_invites()
Callback to resend invites.
Parameters
array $ids: The user external invite Ids.
1 call to user_external_invite_resend_invites()
- user_external_invite_pending_invites_form_submit in ./
user_external_invite.module - Submit callback for user_external_invite_pending_invites_form().
File
- ./
user_external_invite.module, line 303 - Invites a user to site when connecting via external protocol e.g. LDAP.
Code
function user_external_invite_resend_invites($ids = array(), $message = '') {
// Grab row from db and pass to add invite function.
// This is done to avoid duplication, but if enough needs added to resending,
// then a separate resend function should be developed.
$results = db_query('SELECT * FROM {user_external_invite} WHERE id IN (:ids)', array(
':ids' => $ids,
))
->fetchall();
$resend = TRUE;
foreach ($results as $result) {
$message = !empty($message) ? $message : $result->message;
_user_external_invite_add_invite($result->rid, array(
$result->mail,
), $result->uid, $message, $resend);
}
}