Custom method to fetch the profile properties of a Sharepoint User

Posted on January 8, 2010. Filed under: Code Snippets | Tags: , , |

private SPPrincipalInfo ResolveUser(String UserName)
        {
            return SPUtility.ResolvePrincipal(
                this.workflowProperties.Web (resp web url in your context),
                UserName,
                SPPrincipalType.All,
                SPPrincipalSource.All,
                null,
                false);
        }

Usage:  “ResolveUser(_RequestorName).Email ;” //(displayname, login name  etc., )

Advertisements

Make a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

    About

    Xperiments n Xperiences. For the Last 5 years I have been providing variuos portal solutions (SharePoint focused) to my clients and now I intend to publish few of those solutions 'Not As It Is', which might help you. – Mash

    RSS

    Subscribe Via RSS

    • Subscribe with Bloglines
    • Add your feed to Newsburst from CNET News.com
    • Subscribe in Google Reader
    • Add to My Yahoo!
    • Subscribe in NewsGator Online
    • The latest comments to all posts in RSS

    Meta

Liked it here?
Why not try sites on the blogroll...

%d bloggers like this: