Question

I have added one user in one community group In Ektron.In which table in Ektron keeps this entry? I also want to know Is there any table entry changes when admin delete that user from that community group.

Was it helpful?

Solution

Read my caveat first - about half way down in the answer. Bottom line: you are better off working with the API if possible. If it doesn't appear to be possible, then work with Ektron Support so that they are aware of the use case and can try to work it into future versions of the product!

Using Ektron v9.0 sp1, I found the following:

This SQL script gives you the definition of the community group:

SELECT * FROM community_group_tbl WHERE group_id = 1

One of the fields in this table is folder_id. If you use this to look up the corresponding record in the content_folder_tbl, you should find a record where folder_type is equal to 6. This value corresponds with the Community folder type in EkEnumerations:

public enum FolderType
{
    Content = 0,
    Blog = 1,
    Domain = 2,
    DiscussionBoard = 3,
    DiscussionForum = 4,
    Root = 5,
    Community = 6,
    Media = 7,
    Calendar = 8,
    Catalog = 9,
    Program = 14,
}

My folder id was 80, so I used this SQL:

SELECT * FROM content_folder_tbl WHERE folder_id = 80

I also noticed that there is a record in taxonomy_tbl where folder_id is equal to 80:

SELECT * FROM taxonomy_tbl WHERE folder_id = 80
SELECT * FROM taxonomy_tbl WHERE taxonomy_parent_id = (SELECT TOP 1 taxonomy_id FROM taxonomy_tbl WHERE folder_id = 80)

I must admit, however -- I wasn't able to find the full membership list in the database. I found a table called user_to_group_tbl, but it seemed to only have the CMS Users that belonged to the group, with membership users apparently being stored somewhere else.

Now for the caveat: are you sure you want to be looking all this stuff up directly in the database? I know that for some scenarios it can be the best way to go, but the more complex the lookup, the more risky a direct SQL query becomes. Selecting a content block or a taxonomy folder are relatively straight-forward, but this lookup already looks complex. Multiple tables are involved, and you'll be bypassing all the business logic that Ektron has built in to its API.

This API code will get all the users from a community group:

    var cgm = new CommunityGroupManager();
    var users = cgm.GetUserList(1);

    foreach (var directoryUser in users)
    {
        Response.Write(directoryUser.Id + " - " + directoryUser.Username + "<br/>");
    }

You could combine this code with the concept of CMS Extensions and set up event handlers like so:

public class UserGroupCustomExtension : UserGroupStrategy
{
    public override void OnAfterAddUserGroup(Ektron.Cms.UserGroupData userGroupData, CmsEventArgs eventArgs)
    {
        base.OnAfterAddUserGroup(userGroupData, eventArgs);

        if (userGroupData.GroupType == (int) Ektron.Cms.Common.EkEnumeration.GroupType.CommunityGroup)
        {
            // do stuff here...
        }
    }
}

I'm not sure if the exact event you're looking for is currently available, but there are a lot you can tap into. And if the event you need isn't available, be sure to post it as a feature request in their developer forum: http://developer.ektron.com/Forums/?v=f&f=107.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top