• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.0 Editing Templates and Defining a Callback for Pages


I followed the tutorial and I got the same issue as some other members posted. And i replace this line of the code,

$response->params['users'] = $userModel->getLatestUsers(array(), array('limit'=> 5));
with this line,

$response->params['onlineUsers'] = $userModel->getLatestUsers(array(), array('limit'=> 5));
but still facing the same error
  1. Invalid argument supplied for foreach() in /var/www/html/xf/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 461:
    460: ';
    461: foreach ($onlineUsers['records'] AS $user)
    462: {
Please help.