Re: Integration with our user database so nickname dialog does not appear.

  •  07-05-2006, 2:39 AM

    Re: Integration with our user database so nickname dialog does not appear.

    Have you finished this step?
     

    Implement IHttpApplicationUserAdapter interface and Let CuteChat know who has logged in the website


    In this step, you need to implement one simple method:

    //Retrieves the unique identity of the current user
    public CuteSoft.Chat.UserIdentity GetUserIdentity()

    Code Example

    public string GetUserUniqueName()

    {    
         if (Context.User.Identity.IsAuthenticated)
            return Context.User.Identity.Name; 
        return null;

    }

    public CuteSoft.Chat.UserIdentity GetUserIdentity()

    {

        string uniquename = GetUserUniqueName();

        if (uniquename == null)

        {

            return CuteSoft.Chat.UserIdentity.CreateNull();

        }

        CuteSoft.Chat.UserIdentity identity = new CuteSoft.Chat.UserIdentity(uniquename, null, Request.UserHostAddress);

        return identity;

    }
     
    Before you get started, you need to understand the 'UniqueName' in CuteChat. In CuteChat, UniqueName means the unique data of your user. Depending on how you implement the user system, in some systems, the best unique data is the user ID; in some system, every user have a unique account name; some systems like MSN, the unique data is the user email. It could be string(username, email), integer(user ID) or GUID.
     
    If your 'UniqueName' is just your username, you don't need to do anything.:
     
    public string GetUserDisplayName(string useruniquename)
    {
         return useruniquename;
    }
     
    In some systems like MSN, the unique data is the user email. In this situation, you need to write some code return the username based on the email address.
     
    Does it help?
     
    Keep me posted
     
     
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View Complete Thread