Retrieving User Profile Properties for the Current User
Retrieving a user’s profile properties can be achieved with the following block:
Retrieving a user’s profile properties can be achieved with the following block:
I recently needed to add several custom profile properties through a web part for tracking a users’ security preferences for a particular web application.
The following is the method used to create four new properties in the SSP:
Typemock have just released their newest product, Isolator for SharePoint. Isolator is required to run the unit tests included in the latest release from the Patterns & Practices group for SharePoint guidance. Oh, and did I mention that you might be able to snag a full license?
Typemock are offering their new product for unit testing SharePoint called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to unit test SharePoint without a SharePoint server. To learn more click here. The first 50 bloggers who blog this text in their blog and tell us about it, will get a Full Isolator license, Free. for rules and info click here.
The out-of-the-box method DoesUserHavePermissions() on an SPWeb object does not take indirect membership into account (i.e. the current user is a member of a domain group that has access the the SPWeb being checked). To get around this, I use the following method (DoesUserHavePermssionsToWeb(SPUser, SPWeb)):