You are here

function role_expire_admin_settings_submit in Role Expire 7

Submit function.

File

./role_expire.admin.inc, line 59
Administration page.

Code

function role_expire_admin_settings_submit($form, &$form_state) {
  $values = isset($form_state['values']) ? $form_state['values'] : array();
  $data = array();
  $roles = user_roles();
  foreach ($roles as $rid => $role_name) {
    if ($rid > 2) {
      $data[$rid] = $values[$rid];
    }
  }
  variable_set('role_expire_default_roles', json_encode($data));
}