Get current logged user in Sharepoint 2010

核能气质少年 提交于 2019-12-22 09:19:07

问题


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:


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



来源:https://stackoverflow.com/questions/11089400/get-current-logged-user-in-sharepoint-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!