Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get current logged user in Sharepoint 2010

I have a web part that shows me a survey. I need to get the current user so that I can hide or show certain information for the survey depending on the current user's permissions.

like image 311
Christian Avatar asked Jan 17 '23 08:01

Christian


1 Answers

SPContext.Current.Web.CurrentUser should do the trick. It has functions like IsSiteAdmin and Groups that you should be able to use.

like image 103
skeletank Avatar answered Jan 25 '23 23:01

skeletank