• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 564
  • Last Modified:

SharePoint Foundation 2010: Is it possible to Check if a logged in user is member of a certain group?

Hello. Is it possible to check if current user belongs to specified group (etc)? I know this is possible with SharePoint, but what aboutSharePoint Foundation 2010. Does SharePoint foundation allow me to do something like this:

SPWeb theSite = SPControl.GetContextWeb(Context); 
SPUser theUser = theSite.CurrentUser; 
string strUserName = theUser.LogonName; 

Open in new window


Basically I would like to know if user is member of a certain group and use this information to redirect him/her if necessary.
0
tolppa
Asked:
tolppa
  • 2
2 Solutions
 
Rainer JeschorCommented:
Hi,
yes, this should be possible.

KR
Rainer
0
 
indrajitmahajanCommented:
0
 
Rainer JeschorCommented:
To verify if some server-side object code should work in SharePoint foundation just download the SharePoint foundation SDK (which offers some nice coding examples as well):
http://www.microsoft.com/en-us/download/details.aspx?id=12323
 

If the object/method is not available in there then this functionality should be related to the Server editions of SharePoint.

HTH
Rainer
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now