You are viewing limited content. For full access, please sign in.

Question

Question

Community User SDK LFDS

asked on November 20, 2019

I am trying to automatically add a Community user in a similar method to a full user using the LMO.

 

My code below adds the Full user successfully but dos anyone know what changes are required to add a community user:

 

 Public Function AddNamedUserWithFullLicense(ByVal sLDSServer As String, ByVal sRealmName As String, ByVal sUserName As String, ByVal Password As String, RepositoryName As String) As String
        Dim resStr As String = ""
        Dim iResult As Integer
        Try
            Using LDSServer As LMO.Server = LMO.Server.Connect(sLDSServer, False)
                ' Load the LFDS Site
                Dim LDB As LMO.Database = LDSServer.GetDatabaseByRealmName(sRealmName)
                LDB.LoginWindows()
                Dim RepoUser As LMO.LaserficheUser = LMO.LaserficheUser.Create(LDB)

                RepoUser.Enabled = True
                Dim LG(0) As Guid
                LG(0) = LMO.WellKnownLicenseType.Full
                RepoUser.Licenses = LG
                RepoUser.Name = sUserName
                RepoUser.Password = Password
                iResult = RepoUser.Register()
            End Using
        Catch ex As Exception
            Return ex.Message

        End Try

        Return iResult.ToString


    End Function

 

0 0

Replies

You are not allowed to reply in this post.
replied on November 21, 2019

Hi Richard,

Can you please open a support case for this matter? We can assist through that channel.

You are not allowed to follow up in this post.

Sign in to reply to this post.