Elgg  Version master
userpicker.php File Reference

Go to the source code of this file.


 $options = (array) elgg_extract('options', $vars, [])
 Elgg user picker. More...
 $options ['include_banned'] = (bool) elgg_extract('include_banned', $vars, false)
 $options ['friends_only'] = (bool) elgg_extract('only_friends', $vars, false)
 $show_friends = (bool) elgg_extract('show_friends', $vars, true) && !$options['friends_only']
 $default_match_on = 'users'
if($show_friends) elseif($options['friends_only']) if(!isset($vars['name'])) $vars ['match_on'] = elgg_extract('match_on', $vars, $default_match_on)
 $vars ['class'] = elgg_extract_class($vars, ['elgg-user-picker'])
 $vars ['options'] = $options

Variable Documentation

$default_match_on = 'users'

Definition at line 17 of file userpicker.php.

$options = (array) elgg_extract('options', $vars, [])

Elgg user picker.

$vars['only_friends'] If enabled, will turn the input into a friends picker (default: false) $vars['show_friends'] Show the option to limit the search to friends (default: true) $vars['include_banned'] Include banned users in the search results (default: false)

Definition at line 10 of file userpicker.php.

$options['include_banned'] = (bool) elgg_extract('include_banned', $vars, false)

Definition at line 12 of file userpicker.php.

$options['friends_only'] = (bool) elgg_extract('only_friends', $vars, false)

Definition at line 13 of file userpicker.php.

$show_friends = (bool) elgg_extract('show_friends', $vars, true) && !$options['friends_only']

Definition at line 15 of file userpicker.php.

if ($show_friends) elseif ($options['friends_only']) if (!isset($vars['name'])) $vars['match_on'] = elgg_extract('match_on', $vars, $default_match_on)

Definition at line 33 of file userpicker.php.

$vars['class'] = elgg_extract_class($vars, ['elgg-user-picker'])

Definition at line 34 of file userpicker.php.

$vars['options'] = $options

Definition at line 35 of file userpicker.php.