function nodeaccess_grants_form_validate in Nodeaccess 7
Same name and namespace in other branches
- 5 nodeaccess.module \nodeaccess_grants_form_validate()
- 6.2 nodeaccess.module \nodeaccess_grants_form_validate()
- 6 nodeaccess.module \nodeaccess_grants_form_validate()
Validate function for nodeaccess_grants_form.
Parameters
array $form:
array &$form_state:
File
- ./
nodeaccess.module, line 436 - Provide per node access control
Code
function nodeaccess_grants_form_validate($form, &$form_state) {
$form_values =& $form_state['values'];
// Delete unkept users.
if (isset($form_values['uid']) && is_array($form_values['uid'])) {
foreach ($form_values['uid'] as $uid => $row) {
if (!$row['keep']) {
unset($form_values['uid'][$uid]);
}
}
}
if (!isset($form_values['uid'])) {
unset($form_values['uid']);
}
}