You are here

function ctools_context_user_convert_list in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 plugins/contexts/user.inc \ctools_context_user_convert_list()

Provide a list of replacements.

1 call to ctools_context_user_convert_list()
ctools_context_user_edit_convert_list in plugins/contexts/user_edit_form.inc
Provide a list of ways that this context can be converted to a string.
1 string reference to 'ctools_context_user_convert_list'
user.inc in plugins/contexts/user.inc
Plugin to provide a user context.

File

plugins/contexts/user.inc, line 156
Plugin to provide a user context.

Code

function ctools_context_user_convert_list() {
  $tokens = token_info();
  $list = array();
  foreach ($tokens['tokens']['user'] as $id => $info) {
    if (!isset($list[$id])) {
      $list[$id] = $info['name'];
    }
  }
  return $list;
}