获取当前登录用户在2010年的Sharepoint [英] Get current logged user in Sharepoint 2010

查看:189
本文介绍了获取当前登录用户在2010年的Sharepoint的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网络的一部分,显示了我的调查。我需要获得当前用户,这样我可以隐藏或显示,具体取决于当前用户的权限调查的某些信息。

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.

推荐答案

SPContext.Current.Web.CurrentUser 应该做的伎俩。它具有的功能,如 IsSiteAdmin ,你应该能够使用。

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

这篇关于获取当前登录用户在2010年的Sharepoint的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆