How to Get Current User Information

Çarşamba, Ağustos 26th, 2009 @ 18:31

First,

Make definitions,

string siteURL = "http://siteURL";
SPSite site = new SPSite(siteURL);
SPWeb web = site.OpenWeb();

Get Current User,

SPUser user = web.CurrentUser;

Get User Informations,

string name = user.Name;
string loginName = user.LoginName;
string eMail = user.Email;

Hope this post helps,

Tags: , ,
Posted in Sharepoint | No Comments »

Önceki Yazı << Sonraki Yazı >>

Leave a Reply



Time limit is exhausted. Please reload CAPTCHA.