sharepoint - Getting user photo from SPUser using WSS Object model -


i trying retrieve user on sharepoint's user photo through wss 3.0 object model. have been browsing web solutions, far i've been unable find way it. possible, , if how?

here code snippet should job done you. may need additional validation avoid exceptions (ensuring profile exists, ensuring image url exists, etc...):

    //get current profile manager     userprofilemanager objuserprofilemanager = new userprofilemanager(portalcontext.current);     //get current users profile     userprofile profile = objuserprofilemanager.getuserprofile(true);     //get user image url     string imageurl = (string)profile[propertyconstants.pictureurl];      //do here imageurl 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -