Commit ecae54608332ddc7eadc9946d3c84dee5fff4166

Authored by Michael Joseph
1 parent ccae9244

added static getName method


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1241 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 20 additions and 0 deletions
lib/users/User.inc
... ... @@ -491,6 +491,26 @@ class User {
491 491  
492 492 $this->iId = $id;
493 493 }
  494 +
  495 + /**
  496 + * Static
  497 + *
  498 + * Get the username
  499 + *
  500 + * @param integer the user ID
  501 + * @return the username
  502 + */
  503 + function getName($iUserID) {
  504 + global $default;
  505 +
  506 + $sUserName = lookupField($default->owl_users_table, "name", "id", $iUserID);
  507 + if ($sUserName) {
  508 + return $sUserName;
  509 + } else {
  510 + return false;
  511 + }
  512 + }
  513 +
494 514 }
495 515  
496 516 /**
... ...