ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Class ilChatroomUser. More...
Public Member Functions | |
__construct (ilObjUser $user, ilChatroom $chatroom) | |
Constructor Requires ilObjUser and sets $this->user and $this->room using given $user and $chatroom. More... | |
getUserId () | |
Returns Ilias User ID. More... | |
getUsername () | |
Returns username from Object or SESSION. More... | |
setUsername ($username) | |
Sets and stores given username in SESSION. More... | |
getChatNameSuggestions () | |
Returns an array of chat-name suggestions. More... | |
buildAnonymousName () | |
Returns an anonymous username containing a random number. More... | |
buildFullname () | |
Returns users first & lastname. More... | |
buildShortname () | |
Returns first letter of users firstname, followed by dot lastname. More... | |
buildLogin () | |
Returns user login. More... | |
buildUniqueUsername ($username) | |
Static Public Member Functions | |
static | getUserInformation (array $usrIds, int $roomId=null) |
Private Attributes | |
$user | |
$username | |
$room | |
ilChatroomUser::__construct | ( | ilObjUser | $user, |
ilChatroom | $chatroom | ||
) |
Constructor Requires ilObjUser and sets $this->user and $this->room using given $user and $chatroom.
ilObjUser | $user | |
ilChatroom | $chatroom |
Definition at line 36 of file class.ilChatroomUser.php.
ilChatroomUser::buildAnonymousName | ( | ) |
Returns an anonymous username containing a random number.
Definition at line 114 of file class.ilChatroomUser.php.
Referenced by getChatNameSuggestions().
ilChatroomUser::buildFullname | ( | ) |
Returns users first & lastname.
Definition at line 129 of file class.ilChatroomUser.php.
References user().
Referenced by getChatNameSuggestions().
ilChatroomUser::buildLogin | ( | ) |
Returns user login.
Definition at line 153 of file class.ilChatroomUser.php.
References user().
Referenced by getChatNameSuggestions().
ilChatroomUser::buildShortname | ( | ) |
Returns first letter of users firstname, followed by dot lastname.
Definition at line 142 of file class.ilChatroomUser.php.
References user().
Referenced by getChatNameSuggestions().
ilChatroomUser::buildUniqueUsername | ( | $username | ) |
ilChatroomUser::getChatNameSuggestions | ( | ) |
Returns an array of chat-name suggestions.
Definition at line 95 of file class.ilChatroomUser.php.
References PHPMailer\PHPMailer\$options, buildAnonymousName(), buildFullname(), buildLogin(), buildShortname(), and user().
Referenced by ilChatroomViewGUI\showNameSelection().
ilChatroomUser::getUserId | ( | ) |
Returns Ilias User ID.
If user is anonymous, a random negative User ID is created, stored in SESSION, and returned.
ilObjUser | $user |
Definition at line 48 of file class.ilChatroomUser.php.
References $_SESSION, and user().
Referenced by ilChatroom\addPrivateRoom(), ilChatroom\connectUser(), ilChatroom\getLastSession(), ilObjChatroom\getPersonalInformation(), and ilChatroomViewGUI\showRoom().
|
static |
array | $usrIds | |
int | null | $roomId |
Definition at line 195 of file class.ilChatroomUser.php.
References $DIC, $query, $res, $row, and $users.
Referenced by ilChatroomServerHandler\disconnectedUsers(), and ilChatroomViewGUI\lostConnection().
ilChatroomUser::getUsername | ( | ) |
Returns username from Object or SESSION.
If no Username is set, the login name will be returned.
Definition at line 70 of file class.ilChatroomUser.php.
References $_SESSION, $username, and user().
Referenced by ilChatroom\connectUser(), ilObjChatroom\getPersonalInformation(), and ilChatroomViewGUI\showRoom().
ilChatroomUser::setUsername | ( | $username | ) |
Sets and stores given username in SESSION.
string | $username |
Definition at line 85 of file class.ilChatroomUser.php.
References $_SESSION, and $username.
|
private |
Definition at line 27 of file class.ilChatroomUser.php.
|
private |
Definition at line 17 of file class.ilChatroomUser.php.
Referenced by __construct().
|
private |
Definition at line 22 of file class.ilChatroomUser.php.
Referenced by buildUniqueUsername(), getUsername(), and setUsername().