41             require_once 
'Services/User/classes/class.ilObjUser.php';
 
   44             $this->room = $chatroom;
 
   56                 $user_id = $this->user->getId();
 
   58                 if($this->user->isAnonymous())
 
   60                         if(isset(
$_SESSION[
'chat'][$this->room->getRoomId()][
'user_id']))
 
   62                                 return $_SESSION[
'chat'][$this->room->getRoomId()][
'user_id'];
 
   66                                 $user_id                                               = mt_rand(-99999, -20);
 
   67                                 $_SESSION[
'chat'][$this->room->getRoomId()][
'user_id'] = $user_id;
 
   84             $this->username = htmlspecialchars( 
$username );
 
  100                 else if(
$_SESSION[
'chat'][$this->room->getRoomId()][
'username'])
 
  102                         return $_SESSION[
'chat'][$this->room->getRoomId()][
'username'];
 
  106                         return $this->user->getLogin();
 
  119                 if($this->user->isAnonymous())
 
  140             $anonymous_name = str_replace(
 
  141                     '#', mt_rand( 0, 10000 ), $this->room->getSetting(
'autogen_usernames')
 
  144             return $anonymous_name;
 
  154             return $this->user->getLogin();
 
  164             return $this->user->getPublicName();
 
  174             $firstname = $this->user->getFirstname();
 
  176             return $firstname{0} . 
'. ' . $this->user->getLastname();