Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group membership

Status
Not open for further replies.

ZedEnter

Programmer
Sep 15, 2004
40
DE
Hi -

Using: CE10

Is there an easy "SELECT" statement to just check in which group the current logged-in user belongs to?

My current idea is first to check for all users of a certain CE-Usergroup and then after this check if the current logged-in user's id is in this particular query collection.

Greetz - Chris.
 
Here's a start. Let me know what else you might need to know.

SELECT SI_NAME, SI_USERGROUPS FROM CI_SYSTEMOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.User'
 
That did it almost.

How can I now access the group ids listed in the result collection?

There is this SI_TOTAL block inside SI_USERGROUPS (Query Builder) enumerating the usergroups where the user is member of.

Usually I would do this:
Code:
var qryColl = iStore.Query("SELECT SI_USERGROUPS FROM CI_SYSTEMOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.User' AND SI_NAME='" + username +"'");
	
var coll_item = qryColl.Item(1);

var usergroups = coll_item.Properties.Item("SI_USERGROUPS");

But how do I now get "access" to this SI_TOTAL?


Greetz - Chris.
 
Solved ;-)

I didn't know about "Property Bags".

Thx - Chris.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top