When saving options for this plugin, i get:

warning: array_filter() [function.array-filter]: The first argument should be an array in /drupal/sites/views3dev/modules/views/modules/user/views_plugin_argument_validate_user.inc on line 56.

This is produced by this function with a extraneous $options parameter:

  function options_submit(&$form, &$form_state, &$options) {
    // filter trash out of the options so we don't store giant unnecessary arrays
    $options['roles'] = array_filter($options['roles']);
  } 

However if this function is removed, "Restrict user based on role" and "Roles" are not saved.

Also, the process_dependency is broken and roles are displayed even if "Restrict user based on role" is unchecked.

Comments

dagmar’s picture

Issue tags: +alpha-2 blocker

tagging

dagmar’s picture

Status: Active » Needs work
StatusFileSize
new1.82 KB

This patch fix the dependency bug, but options are still not saved. Also in options_submit(&$form, &$form_state, &$options) options has this structure

$options = array('user');

And this doesn't make sense for.

$options['roles'] = array_filter($options['roles']);
merlinofchaos’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Needs work » Patch (to be ported)
StatusFileSize
new2.95 KB

Reworked so that it's all correct. The unset array was, I think, a side effect of the wrong plugin's data being sent to the options_submit. Committed patch attached.

merlinofchaos’s picture

Issue tags: -alpha-2 blocker

Losing tag.

dawehner’s picture

Status: Patch (to be ported) » Fixed

and fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.