function realname_admin_bypass_submit in Real Name 6
Same name and namespace in other branches
- 5 realname.module \realname_admin_bypass_submit()
File
- ./
realname.admin.inc, line 193 - The RealName module allows the admin to choose fields from the user profile that will be used to add a "realname" element (method) to a user object. Hook_user is used to automatically add this to any user object that is loaded.
Code
function realname_admin_bypass_submit($form, &$form_state) {
$bypass_list = explode("\n", $form_state['values']['bypass_forms']);
$bypass_forms = array();
foreach ($bypass_list as $line) {
$line = trim($line);
if ($line) {
$pieces = explode(' ', $line);
$form_info = array(
'name' => array_shift($pieces),
);
$form_info['fields'] = $pieces;
$bypass_forms[] = $form_info;
}
}
variable_set('realname_bypass_forms', $bypass_forms);
// Mark form for realname recalculation.
variable_set('realname_recalculate', TRUE);
drupal_set_message(t('Information saved for !count forms.', array(
'!count' => count($bypass_forms),
)), 'status');
}