[Rejected] avatar isnt shown
Hi, When I use {$mybb->user['avatar']} variable in welcome block, users default avatar isn't shown until he updates his avatar.
This is not a bug. format_avatar() function is responsible for showing the default avatar, that variable never was intended to do so.
So what variable or code should I use to show the default avatar?
$formatted_avatar = format_avatar($mybb->user['avatar']);
Then you can use the result to output the default/custom image with correct dimensions.

Of course you can't do that in templates (unless you're using Template Conditionals or PHP in Templates), you need to create a simple plugin or edit the core files.
This is another great example of why MyBB would benefit from having this functionality in the core Wink

Forum Jump:

Users browsing this thread: 1 Guest(s)