Default photo
Any way to add a default photo for those users that haven't uploaded a photo yet. I'm using 2.1 if that makes a difference.
0
Any way to add a default photo for those users that haven't uploaded a photo yet. I'm using 2.1 if that makes a difference.
Comments
The Vanillicon and Gravatar plugins do it like this:
class YourPlugin extends Gdn_Plugin { public function ProfileController_AfterAddSideMenu_Handler($Sender, $Args) { if (!$Sender->User->Photo) { $Sender->User->Photo = "http://whatever.com/neat.png"; } } } if (!function_exists("UserPhotoDefaultUrl")) { function UserPhotoDefaultUrl($User, $Options = array()) { $PhotoUrl = "http://whatever.com/neat.png"; return $PhotoUrl; } }Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub