You are here

function reviews_get_username in Reviews 7

Helper function to return a username from a user ID.

4 calls to reviews_get_username()
block-review.tpl.php in theme/block-review.tpl.php
Theme template file used to format the reviews page of enabled content types when there are reviews. $variables: $nid: the node ID of the main node being viewed. $reviews: array of reviews $rid: review ID. $uid: user ID of reviewer. $review: review…
review.tpl.php in theme/review.tpl.php
Theme template file used to format the reviews page of enabled content types when there are reviews. $variables: $nid: the node ID of the main node being viewed. $reviews: array of reviews $rid: review ID. $uid: user ID of reviewer. $review: review…
reviews_list in includes/reviews.admin.inc
Form builder for reviews moderation.
reviews_moderation in includes/reviews.admin.inc
Form builder for reviews moderation.

File

includes/reviews.api.inc, line 78
This file contains API functions for the reviews system.

Code

function reviews_get_username($uid) {
  $user = user_load($uid);
  if ($user) {
    return $user->name;
  }
  else {
    return 'Anonymous';
  }
}