Click or drag to resize

IUserIsPassword Method

IsPassword - verify password value against credentials

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
bool IsPassword(
	string Password
)

Parameters

Password
Type: SystemString
String - the password you want to check if it is correct

Return Value

Type: Boolean
Examples

Is password

VB
Dim objSO, User, person, OK
Set objSO = CreateObject("SuperOfficeDB.Database")
if objSO.login ("<username>", "<password>") = true then  'user need useradmin rights

Set persons = objSO.GetAssociateList
For Each person In persons
    If person.LoginName = "HUGO" Then
        OK = 1
        Exit For
    End If
Next

    If  OK = 1 then
        Set user = objSO.Admin.GetUser(person)
        msg = msg & "May we edit login name " & user.CanEditLoginName & vbCrLf
        msg = msg & "May we edit password " & user.CanEditPassword & vbCrLf
        msg = msg & "May we edit usergroup " & user.CanEditUserGroup & vbCrLf
        msg = msg & "Person_id " & user.PersonId & vbCrLf
        msg = msg & "Usergroup " & user.GroupID & vbCrLf
        msg = msg & "Is this current user? " & user.IsCurrentUser & vbCrLf
           msg = msg & "Is the user travelling? " & user.IsOnTravel & vbCrLf
           msg = msg & "Is the users password '123Test'? " & User.IsPassword("123Test") & vbCrLf 
        msg = msg & "Is mailpassword '123Test'? " & User.IsMailPassword("123Test") & vbCrLf 

        MsgBox msg
        result = MsgBox("Do you want to delete this user?", vbYesNo)
        If result = vbYes Then
            user.Delete (True)
        End If
    else
        msgbox "There where no user with username HUGO in this database"
    end If
Else
    MsgBox "Unable to log in, verify username and password"

End if

See Also