You are here

function theme_cmf_user in Content Management Filter 5

Same name and namespace in other branches
  1. 6.2 cmf.module \theme_cmf_user()
  2. 6 cmf.module \theme_cmf_user()
  3. 7 cmf.module \theme_cmf_user()

Theme user cell on table result.

Parameters

user ID:

Return value

clickable username with status

3 theme calls to theme_cmf_user()
cmf_admin_both_form in ./both.inc
Defines the form for mixed content administration filter results.
cmf_admin_comments_form in ./comment.inc
Defines the form for comments administration filter results.
cmf_admin_nodes_form in ./node.inc
Defines the form for nodes administration filter results.

File

./cmf.module, line 718
@brief Content management filter module file

Code

function theme_cmf_user($uid) {
  if ($uid == 0) {
    return variable_get('anonymous', t('anonymous'));
  }
  $result = db_query('SELECT name, status FROM {users} WHERE uid = %d', $uid);
  $user = db_fetch_array($result);
  $url_alias = _cmf_get_user_path($uid);
  $url = $url_alias ? $url_alias : 'user/' . $uid;
  if ($user['status']) {
    $output .= l($user['name'], $url, array());
  }
  else {
    $output .= l(_cmf_get_img('blocked', t('blocked')) . ' ' . $user['name'], $url, array(), NULL, NULL, FALSE, TRUE);
  }
  return $output;
}