Click or drag to resize

IUserIsLoginEnabled Property

Does the user have login rights to CRM 5? Note, the user may also want to be able to log into one of the clients, like web or windows.

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

Property Value

Type: Boolean
Boolean – True if Login is granted
Examples

IsLoginEnabled

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

This will create a new user with username HUGO and password SUPER

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

    If not (objSO is nothing) Then
        'we need a person to add as a user, this will create it and add it as a contact person on the database owner.
        set person = objSO.CreatePerson
        person.firstname = "hugo"
        person.lastname = "super"
        person.contact = objSO.getcontact(objSO.systemownercontactid)
        person.save

        ' create a user with login name "hugo" and password "super"
        set user = objSO.admin.adduser(person) 
        user.IsAsynchEnabled  = true
        user.IsExternalUsersAdminEnabled  = true
        user.IsIntellisyncEnabled  = true
        user.IsLoginEnabled  = true
        user.IsNetserverLoginEnabled  = True
        user.IsOutlookSynchronizerEnabled = true
        user.IsPrivateAppntEnabled  = True
        user.IsPublishEnabled= true
        user.IsReportSDKEnabled  = True
        user.IsRetired = false
        user.IsSQLAuth  = true
        user.IsTravelEnabled  = true
        user.IsWebLoginEnabled  = true
        user.IsWinLoginEnabled  = true
        user.LoginName  = "hugo3"
        user.Password  = "super"
        user.Type  = 0 ' = enAssocTypeLogin
        'set role to the same as currently logged in user
        user.Role = objSO.GetAssociate(objSO.UserAssociateId).role
        user.Save 
        msgbox "New user added with associate_id = " & user.AssociateId & " and person_id=" & user.personid
    end If
End If

See Also