Portal Engine
Version 2.x > Portal Engine > Split users View modes: 
User avatar
Member
Member
Raphael Nys - 1/21/2008 2:40:37 PM
   
Split users
Hi,

We created two cms-systems, connectionsintranet is the main system and zuiderhuis is the sub system.

It looks like this:
- www.connectionsintranet.be
- www.connectionsintranet.be/zuiderhuis

With use one login page:
http://www.connectionsintranet.be/cmspages/logon.aspx

Is it possible to split up users to a system?
I mean that some users can login for /zuiderhuis and others can login for connectionsintranet?

Thx,
Raf Nijs

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/14/2008 4:44:45 PM
   
RE:Split users
Hi Raphael,

When the users are assigned to the sites and are logging into the CMS Desk they should be split and able only to login to appropriate site. Moreover, you can use our API, for example CMSContext.CurrentUser and check whether the user is in site or not (IsInSite()). Our API is available at http://www.kentico.com/downloads/kenticocms_api.zip

Best Regards,
Juraj Ondrus

User avatar
Member
Member
Aon_Vlado - 5/30/2011 9:12:02 PM
   
RE:Split users
Hi Juro,

I am working on a similar solution as Raphael but I will need to add many sub-sites in the future which means that using IsInSite() would not be very elegant and the code would need to be rewritten every time I add a new sub-site. Is there a method retuning all site codes user is register with?
Thanks,


Vlado

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 5/31/2011 1:38:01 AM
   
RE:Split users
Hi,

If the user is assigned only to a particular site, this user can login only to this site and only to this site's CMS Desk.

In CMS Desk -> Administration -> Users you can see users assigned only to current web site.

In CMS Site Manager -> Administration -> Users you can see all users in the system and on the Sites tab when editing the user, you can see to which sites is this user assigned.

Anyway, to manage users you can use the UserInforProvider class and if I am getting the right meaning, you want to get all the users from the CMS. If so, you can use CMS.SiteProvider.UserInfoProvider.GetAllUsers() or, there are also other methods in that class you can use to get the users.

Best regards,
Juraj Ondrus

User avatar
Member
Member
Aon_Vlado - 5/31/2011 6:30:37 AM
   
RE:Split users
I am looking for a method like user.GetAllRegisteredSiteNames() or Application.GetAllSiteNames().

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/1/2011 8:01:13 AM
   
RE:Split users
Hi,

Sorry for the confusion, I got it know.

You can use this method (or, you can take look to that class for other methods too):

CMS.SiteProvider.UserInfoProvider.GetUserSites(int userID)

Best regards,
Juraj Ondrus