How to obtain the user identity on My Profile page of MySite
Had a scenario where in I had to get User Identity of one of my colleague in My Profile page of MySite in MOSS.
Sample Code snippet
------------------------------------
SPSecurity.RunWithElevatedPrivileges(delegate()
{
IPersonalPage page = this.Page as IPersonalPage;
using (SPSite mysitenew = new SPSite(page.PersonalSite.Url))
{
writer.Write("Real User: " + mysitenew.Owner.ToString());
}
});
Comments
- Anonymous
November 13, 2008
PingBack from http://mstechnews.info/2008/11/how-to-obtain-the-user-identity-on-my-profile-page-of-mysite/