Displaying Avatars on Custom Index

Hey Guys,

 I wrote my own custom index plugin to display my own html/php homepage. And I wanted to add an avatar listing on my index page but am having a little issue. Below is the snippet of code that appears in the body of my index page. It is code based on the <a href="http://community.elgg.org/pg/plugins/project/384692/developer/jdalsem/avatar-wall"&gt; Avatar Wall</a> plugin that I modified. Would you be so kind as to give it a look and see why nothing appears. I did echo Count($users); and it was the correct number of users, so I am getting all the users, but do you know why don't they display when I echo them?



// Start engine from original plug, don't need it

/* require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); */

$users_max = 1000;

        $onlyWithAvatar = "no";

if(empty($onlyWithAvatar) || $onlyWithAvatar == "no")

  {$users = get_entities('user','',null,null,$users_max,0);} 


  {$users = get_entities_from_metadata('icontime', '', 'user', '', 0, $users_max);}

           $wallIconSize = "small";


foreach($vars['users'] as $user){

echo "<a href='" . $user->getURL() . "'><img class='avatars' alt='" . $user->name . "' src='". $user->getIcon($vars['wallIconSize']) . "'></a>";




Thanks for the help guys!