Click or drag to resize
ChatUserHelper Class
Helper class specific for chat user.
Inheritance Hierarchy
SystemObject
  CMS.ChatChatUserHelper

Namespace: CMS.Chat
Assembly: CMS.Chat (in CMS.Chat.dll) Version: 12.0.0
Syntax
C#
public static class ChatUserHelper

The ChatUserHelper type exposes the following members.

Methods
  NameDescription
Public methodStatic memberChangeChatUserNickname
Changes nickname of passed chatUser.
Public methodStatic memberCheckAdminRoomRights(Int32)
Check if current user has admin rights to room. User have admin rights if one of the following conditions is valid: - he is global admin - he has permission ChatPermissionEnum.ManageRooms - he is creator of this room - he is associated as admin to this room in table ChatRoomAdmin - room is support (ChatRoomIsSupport = true) and user has permission ChatPermissionEnum.EnterSupport
Public methodStatic memberCheckAdminRoomRights(Int32, ChatUserInfo)
Check if user has admin rights to room. User have admin rights if one of the following conditions is valid: - he is global admin - he has permission ChatPermissionEnum.ManageRooms - he is creator of this room - he is associated as admin to this room in table ChatRoomAdmin - room is support (ChatRoomIsSupport = true) and user has permission ChatPermissionEnum.EnterSupport
Public methodStatic memberCheckJoinRoomRights
Checks if current chat user has Join rights to the specified room. - user can't be kicked - if room is public, user always has Join rights - if he is admin, he also has join rights - supporters always have Join rights in support rooms
Public methodStatic memberGetChatUserFromCMSUser
Gets chat user assigned to CURRENT CMSUser. If chat user does not exist, it is created with nickname set to FullName of CMSUser.
Public methodStatic memberGetChatUserFromCMSUser(UserInfo)
Gets chat user assigned to passed CMSUser. If chat user does not exist, it is created with nickname set to FullName of CMSUser.
Public methodStatic memberHasChatUserPermission
Checks if chat user has permission.
Public methodStatic memberIsNicknameAvailable(String)
Returns true if nickname is available. Otherwise false. Takes into account ForceAnonymUniqueNicknamesSetting.
Public methodStatic memberIsNicknameAvailable(String, Boolean)
Returns true if nickname is available. Otherwise false. Current user is not counted.
Public methodStatic memberRegisterAndLoginChatUser
Registers guest chat user. His nickname is generated automatically. If CMS User is logged in, guest is not registered and this CMS User is logged in.
Public methodStatic memberRegisterAndLoginChatUser(Boolean)
Registers guest chat user. His nickname is generated automatically. If CMS User is logged in, guest is not registered and this CMS User is logged in.
Public methodStatic memberRegisterAndLoginChatUser(String)
If CMS User is currently logged in, it logs him into chat. Parameter nickname is ignored in that case. If CMS User is not logged in, user is registered as anonymous chat user with nickname set to parameter nickname. Does nothing if chat user is currently logged in.
Public methodStatic memberRegisterAndLoginChatUser(String, Boolean)
If CMS User is currently logged in, it logs him into chat. Parameter nickname is ignored in that case. If CMS User is not logged in, user is registered as anonymous chat user with nickname set to parameter nickname. Does nothing if chat user is currently logged in.
Public methodStatic memberRegisterAnonymousChatUser
Registers anonymous chat user with specified nickname.
Public methodStatic memberVerifyChatUserHasJoinRoomRights
Verifies that currently logged in chat user has join rights for a room. Throws exception with AccessDenied (or Kicked) type and message set to the cause of the denial in case of failure and does nothing in case of success. Join rights: - user can't be kicked - if room is public, user always has Join rights - if he is admin, he also has join rights - supporters always have Join rights in support rooms
Public methodStatic memberVerifyNicknameIsValid
Checks if nickname is valid. Nickname is also trimmed. Nickname cannot be empty Nickname cannot exceed 50 characters User can't manually change his nickname to guest nickname Throws exception if not valid
Top
See Also