I have a Custom WebPart which gets credentials from the site into a GridView-Table. The result (user and credential) is shown as strings. I want to create a Hyperlink to the users e.g. mysite, instead using strings. Is this possible?
There are built in web-parts for this, but I always feel they aren't quite right.
So what you need to access is:
SPWeb > SPGroupCollection > ForEach SPGroup > ForEach SPGroup.Users > SPUser.OwnedGroups
Then display out your tree like:
Users > Groups
Groups > Users
The code for getting the properties is: