1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +02:00

Fixes #1858 - Generic avatar displayed when {USER_AVATAR} contains no parms.

This commit is contained in:
Cameron
2016-10-23 09:37:47 -07:00
parent bb712031b9
commit e703c45441

View File

@@ -1,15 +1,19 @@
<?php
// $Id$
function user_avatar_shortcode($parm=null) //TODO new function $tp->toAvatar(); so full arrays can be passed to it.
function user_avatar_shortcode($parm=null)
{
if(is_string($parm))
if(!empty($parm) && is_string($parm))
{
$data = array('user_image'=>$parm);
}
elseif(is_array($parm))
elseif(!empty($parm) && is_array($parm))
{
$data = $parm;
}
else
{
$data = null;
}
return e107::getParser()->toAvatar($data, $data);
/*
@@ -100,4 +104,3 @@ function user_avatar_shortcode($parm=null) //TODO new function $tp->toAvatar();
*/
}
?>