SPWeb web = SPControl.GetContextWeb(Context);
SPUser sUser = web.CurrentUser;
string str = "Name:" + sUser.Name + "
"; "Login Name :" + sUser.LoginName + "
"; "Email:" + sUser.Email + "
"; "Groups:" + sUser.Groups.Count + "
";
foreach (SPGroup grp in sUser.Groups) { " * " + grp.Name + " total Members:" + grp.Users.Count + "
"; catch (Exception ex) { "No Current User" ;
Getting the Current User Name or ID in SharePoint using SharePoint Designer (no code):
http://blogs.msdn.com/joshuag/archive/2008/06/03/getting-the-current-user-name-or-id-in-sharepoint-using-sharepoint-designer-no-code.aspx
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment