Click or drag to resize

IUserGroupID Property

The user group this user belongs to, this will default to the first user group if not set to a new user.

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
int GroupID { get; set; }

Property Value

Type: Int32
Long – the usergroup_id
Examples

GroupId

This text may be copied to the notepad, and saved as a *.vbs file. Remember to change the login information.

This will return the user with username HUGO from the SOAdmin.Username example.

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