ILIAS
Release_4_2_x_branch Revision 61807
|
Class ilChatroomUser. More...
Public Member Functions | |
__construct (ilObjUser $user, ilChatroom $chatroom) | |
Constructor. | |
getUserId () | |
Returns Ilias User ID. | |
setUsername ($username) | |
Sets and stores given username in SESSION. | |
getUsername () | |
Returns username from Object or SESSION. | |
getChatNameSuggestions () | |
Returns an array of chat-name suggestions. | |
buildAnonymousName () | |
Returns an anonymous username containing a random number. | |
buildLogin () | |
Returns user login. | |
buildFullname () | |
Returns users first & lastname. | |
buildShortname () | |
Returns first letter of users firstname, followed by dot lastname. |
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 33 of file class.ilChatroomUser.php.
References $user.
ilChatroomUser::buildAnonymousName | ( | ) |
Returns an anonymous username containing a random number.
Definition at line 142 of file class.ilChatroomUser.php.
Referenced by getChatNameSuggestions().
ilChatroomUser::buildFullname | ( | ) |
Returns users first & lastname.
Definition at line 166 of file class.ilChatroomUser.php.
Referenced by getChatNameSuggestions().
ilChatroomUser::buildLogin | ( | ) |
Returns user login.
Definition at line 156 of file class.ilChatroomUser.php.
Referenced by getChatNameSuggestions().
ilChatroomUser::buildShortname | ( | ) |
Returns first letter of users firstname, followed by dot lastname.
Definition at line 176 of file class.ilChatroomUser.php.
Referenced by getChatNameSuggestions().
ilChatroomUser::getChatNameSuggestions | ( | ) |
Returns an array of chat-name suggestions.
Definition at line 117 of file class.ilChatroomUser.php.
References buildAnonymousName(), buildFullname(), buildLogin(), and buildShortname().
Referenced by ilChatroomViewTask\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.
Referenced by ilChatroom\addPrivateRoom(), ilChatroomPrivateRoomTask\buildMessage(), ilChatroom\connectUser(), ilChatroomServerConnector\createPrivateRoom(), ilChatroom\getLastSession(), ilObjChatroom\getPersonalInformation(), ilChatroom\getSessions(), and ilChatroomViewTask\showRoom().
ilChatroomUser::getUsername | ( | ) |
Returns username from Object or SESSION.
If no Username is set, the login name will be returned.
Definition at line 89 of file class.ilChatroomUser.php.
References $_SESSION, and $username.
Referenced by ilChatroom\connectUser(), ilObjChatroom\getPersonalInformation(), and ilChatroomViewTask\showRoom().
ilChatroomUser::setUsername | ( | $username | ) |
Sets and stores given username in SESSION.
string | $username |
Definition at line 77 of file class.ilChatroomUser.php.
|
private |
Definition at line 22 of file class.ilChatroomUser.php.
|
private |
Definition at line 20 of file class.ilChatroomUser.php.
Referenced by __construct().
|
private |
Definition at line 21 of file class.ilChatroomUser.php.
Referenced by getUsername(), and setUsername().