You are here

function realname_admin_bypass_submit in Real Name 5

Same name and namespace in other branches
  1. 6 realname.admin.inc \realname_admin_bypass_submit()

File

./realname.module, line 448
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_id, $form_values) {
  $bypass_list = explode("\n", $form_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);
  drupal_set_message(t('Information saved for !count forms.', array(
    '!count' => count($bypass_forms),
  )), 'status');
}