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,

İlişkili Yazılar :

  1. How Can I Get Current Site Url in Sharepoint (Programmatically)
  2. How To “Add Site Collection Administrators in Sharepoint”
  3. “Current Window” Print Screen
  4. InfoPath Errors
  5. Automatic Refresh Uyarısı Nasıl Kaldırılır?
  6. Sharepoint Listelerinin GUID’ni Bulmak
  7. Google Translate Kullanarak .NeT de Dil Çevrimi
  8. Machinarium Hileleri
  9. Fotoğraflarınıza Efekt Verin
  10. How Can I Access The ‘Web Part Maintenance Page’ ?

Tags: , ,
Posted in Sharepoint | No Comments »

Önceki Yazı << Sonraki Yazı >>

Leave a Reply