You are here

function me_plugin_argument_validate_me_alias::options_validate in me aliases 8

Same name and namespace in other branches
  1. 7 includes/views/handlers/me_plugin_argument_validate_me_alias.inc \me_plugin_argument_validate_me_alias::options_validate()

Provides a form of options for our validator.

File

includes/views/handlers/me_plugin_argument_validate_me_alias.inc, line 34
Argument validator to help validate the me alias. If the argument is 'me', other validators will most likely be useless at this point, so we provde the same functionality as the user validator.

Class

me_plugin_argument_validate_me_alias
Validate whether an argument is an acceptable me alias, and user name/uid.

Code

function options_validate(&$form, &$form_state) {

  // We are unable to rely on options having already been set, so let's make
  // sure defaults are here:
  parent::options_validate($form, $form_state);
  if (!isset($this->argument->options['me_redirect'])) {
    $this->argument->options['me_redirect'] = FALSE;
    $this->argument->options['me_validate_user_argument_type'] = 'uid';
    $this->argument->options['me_validate_user_roles'] = array();
  }
}