Want to check for operator client and user client in global.asax

Last post 07-16-2010, 11:25 PM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  07-15-2010, 10:16 AM 62508

    Want to check for operator client and user client in global.asax

     I wanted to check the operator client and user client in global.asax so when i debug in asp.net code i saw it hit "GetLogonIdentity()" function in global.asax but not able to write the condition so that i can check which one is from operator client and which one is user client so can you plz tell me what would be the reference gunction for operator client for "GetLogonIdentity()"  and what is the file name..wanted to write
     GetLogonIdentity() in global.asax given below
     
     
    Public Overrides Function GetLogonIdentity() As AppChatIdentity
    Dim Context As HTTPContext= HTTPContext.Current
    If context IsNot Nothing Then

    Dim loginName As String = context.User.Identity.Name
                    Dim cachekey As String = "NickName:" & loginName
                    Dim userid As String = ToUserId(loginName)
                    Dim nickName As String = Nothing
                    If Not context Is Nothing Then
                        Dim myLoggedInUser As String = ""
                        Try
                            myLoggedInUser = context.Request.Cookies("LoggedInUser").Value
                        Catch ex As Exception

                        End Try

    If myLoggedInUser <> "" Then
                            '                got user id from cookie
                            Return New AppChatIdentity(myLoggedInUser, False, myLoggedInUser, context.Request.UserHostAddress)
                        Else
                            ' try to get userid from web
                            myLoggedInUser = getLoggedInUser(context)
                            If Not myLoggedInUser Is Nothing AndAlso myLoggedInUser <> "" Then
                                Return New AppChatIdentity(myLoggedInUser, False, myLoggedInUser, context.Request.UserHostAddress)
                            End If
                        End If
                    End If
                    'Dim exists As Boolean = GetUserInfo(loginName, nickName)
                    'If Not exists Then
                    '    Return Nothing
                    'End If

                    'Return New AppChatIdentity(myLoggedInUser, False, myLoggedInUser, context.Request.UserHostAddress)
                    'End If
                End If
    Return Nothing
    End Function
  •  07-16-2010, 11:25 PM 62544 in reply to 62508

    Re: Want to check for operator client and user client in global.asax

    Hi vitt,
     
    The code below can check the user is operator or not in mehtod "GetLogonIdentity".
     
    ChatSystem.Instance.GetCurrentPortal().DataManager.IsAgent("User:userid")
     
    Regards,
     
    ken
View as RSS news feed in XML