[Building Sakai] Profile2 user image

David Wafula davidwaf at gmail.com
Thu Nov 3 14:08:06 PDT 2011


Thank you!

On Fri, Oct 28, 2011 at 12:21 AM, Steve Swinsburg <steve.swinsburg at gmail.com
> wrote:

> Hi,
>
> You can use the following URL directly in your HTML to get a user's image:
>
> /direct/profile/userid/image
>
> This will always return a (privacy and preference checked) image and
> according to any config you have in sakai.properties for Profile2. You can
> read more about it here:
>
> http://nightly2.sakaiproject.org:8082/direct/profile/describe
>
> Retrieve the profile image for a user. Append /thumb to get the thumbnail
> (/profile/USER/image/thumb) if there is one. If there is no thumbnail, the
> main image will be returned. Optionally add the siteId URL param to allow
> site permissions to be checked (/profile/USER/image?siteId={siteid} or
> /profile/USER/image/thumb?siteId={siteid}) Returns binary of the image.
> Returns default image if no image exists or not allowed. Return 404 if user
> (or optional siteId) is invalid. Will always return an image if one exists,
> either by being uploaded or being a url (depending on how the system has
> been configured - see Profile2 sakai.properties. You can use it directly in
> an img tag <img src="/profile/USER/image[/thumb]" />, it should always
> return something. DO NOT specify any return format, ie .xml.
>
> cheers,
> Steve
>
>
> On 28/10/2011, at 8:30 AM, David Wafula wrote:
>
> Team,
> How do i get (programmatically of course), profile picture  of a user, if
> all i have is a User object ?
>
> thanks.
> --
> David Wafula
>  _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
>
>


-- 
David Wafula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20111103/8c7ce6da/attachment.html 


More information about the sakai-dev mailing list