How can get user list from the EPI Server?

Vote:
 

How can we listout the user which are belogs to the ACL?

Is there any other way to list out the no of user in an group from EPI Server?

#21851
Jul 11, 2008 13:42
Vote:
 

Hi Ganesan,

What version of EPiServer are you reffering to?


On the first question. Do you only want to list a user that has some specified access rights set on the user?

#21856
Jul 11, 2008 16:31
Vote:
 

Hi Sebastian,

Thanks for your reply.

Right now i'm using EPI Server CMS 5.

Here i would like to get the users list, like which are all the users are belongs to the particular user group.

For example i have the user groups like Web Admin, Web Editor and Reader and i have assigned to some users also. Now i want to retrive the users whose belongs to the Readers group or Web Editors group.

Currenlty i'm using the ACL to retirve the User Groups. here is the code for it.

foreach (RawACE ace in pdRoles.ACL.ToRawACEArray())
{
    ListItem lstItem = new ListItem();
    lstItem.Text = ace.Name.ToString();
    chklstUserGroups.Items.Add(lstItem);
}
This is the way i'm getting the User Groups, like that is there anyother way to retirve the User Names which belongs to the User Groups of a Page.

How can i get it? guide me..

 

#21962
Jul 17, 2008 9:04
Vote:
 
string[] usersInRole = Roles.GetUsersInRole(group);
foreach (string sUser in usersInRole)
{
MembershipUser user = Membership.GetUser(sUser);
}
#21964
Jul 17, 2008 10:07
Vote:
 

Thanks Erik.

It's working fine.

#21988
Jul 18, 2008 14:00
Vote:
 

HI

I am using the default EPiserver 6 templates. I havea similar requiremt. COuld you please let me know the namespaces for Roles and Membership user as the above des not seem to work for me.

Thanks

Sandeep

#46579
Dec 20, 2010 1:56
Vote:
 

Roles and Membership reside in System.Web.Security.

Edit: And of course MembershipUser as well.

#46582
Edited, Dec 20, 2010 8:11
Vote:
 

Hi Magnus

Thank you very much.

Kind Regards

Sandeep

#46600
Dec 20, 2010 13:51
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.