Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Ektron API – GetUserGroup

Posted on February 21, 2013October 26, 2015 By David Kittell
public static int GetUserGroup(int userID, string GroupID)
	{
		int inGroup = 0;
		string UsersGroups = "";
		if (userID != 0)
			{
				Ektron.Cms.API.Common CommonApi = new Ektron.Cms.API.Common();
				Ektron.Cms.API.User.User UserAPI = new Ektron.Cms.API.User.User();
				Ektron.Cms.GroupData GroupData = new Ektron.Cms.GroupData();
				//Number of Provider(" + System.Convert.ToString(UserAPI.GetUserGroupByName("<GROUP NAME>").GroupId) + ") Users: " + System.Convert.ToString(UserAPI.GetUserGroupByName("<GROUP NAME>").UserCount);
				Ektron.Cms.GroupData[] gData = UserAPI.GetGroupsUserIsIn(UserAPI.UserId, "GroupID");
				foreach (Ektron.Cms.GroupData g in gData)
					{
						UsersGroups += g.GroupId + "',";
					}
				string[] strGroupIDs = UsersGroups.Split(',');
				foreach (string strGroupID in strGroupIDs)
					{
						if (GroupID == strGroupID)
							{
								inGroup = 1;
							}
						if (strGroupID == "1")
							{
								inGroup = 2;
							}
					}
			}
		return inGroup;
	}
Originally Posted on February 21, 2013
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

C# Ektron Code Ektron Ektron User Management

Post navigation

Previous post
Next post

Related Posts

Compare SQL column against another column

Posted on January 29, 2015October 26, 2015

In a recent effort to clean up duplicates in my contacts I came across a script to assist me. In my situation I have some contacts that have had the company name inserted as the first/last name. SELECT id, [Company], [Title], [First Name], [Middle Name], [Last Name] FROM [OutlookContacts] WHERE…

Read More

Bash – Suction (Move files from subfolders into parent)

Posted on April 9, 2018December 13, 2022

find . -mindepth 2 -type f -print -exec mv {} . \; # Delete empty directories find . -depth -empty -type d -exec rm -rfv {} \; Originally Posted on April 9, 2018Last Updated on December 13, 2022 All information on this site is shared with the intention to help….

Read More

Read Text File Line By Line

Posted on September 18, 2013October 26, 2015

Public Class ReadFromFile Shared Sub Main() Dim sFileName As String Dim srFileReader As System.IO.StreamReader Dim sInputLine As String sFileName = "test.txt" srFileReader = System.IO.File.OpenText(sFileName) sInputLine = srFileReader.ReadLine() Do Until sInputLine is Nothing System.Console.WriteLine(sInputLine) sInputLine = srFileReader.ReadLine() Loop End Sub End Class Originally Posted on September 18, 2013Last Updated on October…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes