Get current logged user in Sharepoint 2010

2019-05-06 08:45发布

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.

1条回答
啃猪蹄的小仙女
2楼-- · 2019-05-06 09:37

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

查看更多
登录 后发表回答