Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[Solved] Getting the photo of a user?

edited March 2012 in Vanilla 2.0 - 2.8


I am currently building a Friends application for my forum. Basically I have the ID of the user who is the friend. I am trying to return the photo of the user from their profile, but the path is incorrect.

I am currently doing:
$User = Gdn::UserModel()->GetID($FriendID); $Photo = $User->Photo;

This is returning: userpics/093/NWSAFYWSUMUF.jpg, but nothing shows. Right clicking and viewing the photo on a page shows that there is an extra letter before the start of the filename.



Best Answer

  • Options
    x00x00 MVP
    Answer ✓

    Use this function


    grep is your friend.


Sign In or Register to comment.