Advertisement
wzline

User name format b24

Dec 21st, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. public function getUserName($id)
  2.     {
  3.         $result = array();
  4.         $id = (is_array($id) ? implode('|', $id) : $id);
  5.         $r = CUser::GetList(($by="id"), ($order="asc"), array('ID' => $id), array('FIELDS' => array('ID', 'NAME', 'SECOND_NAME', 'LAST_NAME', 'LOGIN')));
  6.         while ($u = $r->Fetch())
  7.         {
  8.             $result[$u['ID']] = CUser::FormatName(CSite::GetNameFormat(true), $u, true, true);
  9.         }
  10.         return count($result) > 0 ? $result : false;
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement