I'm trying to simply connect to a users profile and list there links.
I'm hoping I can figure out the details after which that I need. What
my problem is - is I can't even find a way to get the quicklink values
at all!
Here's the code I've got working so far:
SPSite site = new SPSite("http://intranet");
SPWeb web = SPControl.GetContextWeb(this.Context);
web.AllowUnsafeUpdates = true;
ServerContext context = ServerContext.GetContext(site);
UserProfileManager profileManager = new UserProfileManager(context);
//Getting the current user
UserProfile u = profileManager.GetUserProfile(true);
//Displaying Users Profile Properties
writer.Write(u[PropertyConstants.FirstName].Value);
//Getting Lost here..
writer.Write(u[PropertyConstants.QuickLinks].Value + "<BR>");
QuickLinkManager qlm = u.QuickLinks;
//Adding a link to the profile
qlm.Create("Test", "http://www.test.com", QuickLinkGroupType.General,
null, Privacy.Private);
So I'm able to connect to the user profile and list out whatever
property I'd like, except for the quicklinks.. If someone knows of a
good reference for this? I'm even able to add to the links, but not
list them. I know by looks at msdn it states that the code is
obsolete, but it works - and when I try and use what they mention in
VS it says those are obsolete..