HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Display UserPhoto without logged
RafaelScotti
New
Hello everybody,
As I change this code to display the profile picture without the need to log in ? (translated by google 1)
how to change this code to show the profile picture , without being logged in ? (translated by google 2)
<?php $Session = Gdn::Session(); if ($Session->IsValid()) { echo Img(Gdn_Upload::Url(ChangeBasename($Session->User->Photo, 'p%s')), array('width' => '37px', 'height' => '37px')); }?>
Thanks and sorry for my bad english
0
Comments
The problem is, that there will be no picture available for a guest. It displays the picture of the currently logged in user.
So basically, you would have to implement a fallback
Thanks brother