function nodeaccess_grants_form_validate in Nodeaccess 6
Same name and namespace in other branches
- 5 nodeaccess.module \nodeaccess_grants_form_validate()
- 6.2 nodeaccess.module \nodeaccess_grants_form_validate()
- 7 nodeaccess.module \nodeaccess_grants_form_validate()
Validate function for nodeaccess_grants_form.
File
- ./
nodeaccess.module, line 487
Code
function nodeaccess_grants_form_validate($form, &$form_state) {
$form_values =& $form_state['values'];
// Delete unkept users.
if (is_array($form_values['uid'])) {
foreach ($form_values['uid'] as $uid => $row) {
if (!$row['keep']) {
unset($form_values['uid'][$uid]);
}
}
}
if (!$form_values['uid']) {
unset($form_values['uid']);
}
if ($form_state['clicked_button']['#id'] == 'edit-search') {
$form_state['rebuild'] = TRUE;
}
else {
unset($form_state['rebuild']);
}
}