You are here: MessengerYouLike.IMSDK.IMServer > IMSDK.IMServer Reference > IMSDK Namespace > IMServer Class > IMServer Methods > IMServer.VerifyLogin Method
MessengerYouLike.IMSDK.IMServer
IMServer.VerifyLogin Method

Verify login ,For Integration prepose Only.

C#
public MustOverride int VerifyLogin(String Username, String password);
Visual Basic
Public MustOverride Function VerifyLogin(ByVal Username As String, ByVal password As String) As Integer
Parameters 
Description 
ByVal Username As String 
Username to Verify 
ByVal password As String 
Password to verify 

if the username and password are valid return the ID of the user and 

If username or password is invalid then return -1

 

if the current system is integrated into any existing system then this function should be implemented 

the username and password needs to verified against your database once that is done the ID [Primary key] of that user must be returned , the column name of the ID must be set to this property IMSDK.IMServer.ColName_MessengerYouLike_ID

'[Visual Basic]
 
 
Partial Class MessengerYouLike_Web
        Inherits System.Web.UI.Page
 
 
        Protected WithEvents MessengerYouLike_Server1 As New ClsIM
 
 
 
' " Web Form Designer Generated Code "
 
 
        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Try
 
                MessengerYouLike_Server1.ConnectionString = "server=ServerLocation;database=DBName;uid=Username;pwd=password"
                MessengerYouLike_Server1.DatabaseType = MessengerYouLike.IMSDK.IMServer.DatabaseProviders.MSSQL
                MessengerYouLike_Server1.SecertKey = "abcdef"
                MessengerYouLike_Server1.Integrated = False
 
                If Request.Form.ToString <> "" Then
                    MessengerYouLike_Server1.PassData(Request.Form.ToString())
                End If
 
 
            Catch ex As Exception
                Response.Write(ex)
            End Try
        End Sub
 
        Private Sub MessengerYouLike_Server1_OnError(ByVal data As String) Handles MessengerYouLike_Server1.OnError
            Response.Write(data)
        End Sub
 
 
        Protected Sub MessengerYouLike_Server1_OnLogOut(ByVal Username As String) Handles MessengerYouLike_Server1.OnLogOut
            Response.Write(Username)
        End Sub
 
 
 
    End Class
 
 
 
   Public Class ClsIM
        Inherits MessengerYouLike.IMSDK.IMServer
 
 
 
        Public Overrides Function NewUserRegistration(ByVal Username As String, ByVal Password As String, ByVal Email As String, ByVal Firstname As String, ByVal Lastname As String) As Boolean
           'Your Implemention details
        End Function
 
 
        Public Overrides Function VerifyLogin(ByVal Username As String, ByVal password As String) As Integer
         'Your Implemention details
        End Function
 
    End Class
 
You are here: MessengerYouLike.IMSDK.IMServer > IMSDK.IMServer Reference > IMSDK Namespace > IMServer Class > IMServer Methods > IMServer.VerifyLogin Method
Copyright (c) 2007. All rights reserved.