I’m using I4USPHP widget for some PHP code, and everything works fine – until the moment that I need to display some user photo. I have an array of users, and have also their IDs. I called this function, but it definitely doesn’t work:
echo $this->itemPhoto($someUser['user_id'], 'thumb.icon');
After a while i tought that $this keyword is creating problem, then I tried following:
echo Engine_Api::_()->itemPhoto($korisnik['user_id'], 'thumb.icon');
but still not working. Does someone have a clue what I’ve been doing wrong?
You are passing first argument user_id. This function require first argument is “item object” that’s why its not working
Controller :
$this->view->subject = Engine_Api::_()->core()->getSubject('event');View :
<?php echo $this->itemPhoto($this->subject(), 'thumb.icon') ?>