function invite_form_submit in Invite 7.4
Same name and namespace in other branches
- 5.2 invite.module \invite_form_submit()
- 5 invite.module \invite_form_submit()
- 6.2 invite.module \invite_form_submit()
- 7.2 invite.module \invite_form_submit()
Invite creation submit handler.
_state
Parameters
$form:
1 string reference to 'invite_form_submit'
- invite_form in includes/
invite.admin.inc - Invite Form.
File
- includes/
invite.admin.inc, line 237
Code
function invite_form_submit($form, &$form_state) {
global $user;
$invite = $form_state['invite'];
$token_data = array(
'invite' => $invite,
'user' => $user,
'profile' => user_load($user->uid),
);
entity_form_submit_build_entity('invite', $invite, $form, $form_state);
if (invite_save($invite)) {
$invite_uri = entity_uri('invite', $invite);
$invite_redirect = token_replace(variable_get('invite_redirect_upon_create', NULL), $token_data);
$form_state['redirect'] = $invite_redirect ? $invite_redirect : $invite_uri;
}
}