function og_massadd_admin_settings_validate in Organic Groups Mass Add 7
Same name and namespace in other branches
- 6 og_massadd.admin.inc \og_massadd_admin_settings_validate()
Validate the certify configuration form
File
- ./
og_massadd.admin.inc, line 63 - Administration callbacks for the og_massadd module
Code
function og_massadd_admin_settings_validate($form, $form_state) {
$profilenode = $form_state['values']['og_massadd_profilenode'];
if (drupal_strlen($profilenode) && !field_info_field($profilenode)) {
form_set_error('og_massadd_profilenode', t('Please choose a profile node (or leave blank).'));
}
$fname = $form_state['values']['og_massadd_profilefname'];
if (drupal_strlen($profilenode) && drupal_strlen($fname) && !field_info_field($fname)) {
form_set_error('og_massadd_profilefname', t('Please choose a field for the user\'s first name or leave empty.'));
}
$lname = $form_state['values']['og_massadd_profilelname'];
if (drupal_strlen($profilenode) && drupal_strlen($lname) && !field_info_field($lname, $profilenode)) {
form_set_error('og_massadd_profilelname', t('Please choose a field for the user\'s last name or leave empty.'));
}
}