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?
Stewartiee
New
Hello.
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.
Help?
Thanks.
0
Answers
Use this function
UserPhoto($User);
grep is your friend.
@x00 Perfect, thank you.