Hello, i need to get a list of users and respective avatars from an external php script.
I do this but i get:
An unexpected error occurred. Please try again later.
anyone can help me? I prefer to avoid use the REST APIs
thanks
I do this but i get:
An unexpected error occurred. Please try again later.
PHP:
<?php
$fileDir = $_SERVER['DOCUMENT_ROOT'].'/forums/';
require($fileDir . '/src/XF.php');
XF::start($fileDir);
$app = \XF::setupApp('XF\App');
$db = $app->getDb();
$utente = $db->fetchRow("SELECT * FROM xf_user WHERE username = ?", 'zuleika_scarpa');
//print_r($utente);
$avatar = XenForo_Template_Helper_Core::callHelper('avatar', array($utente, 's'));
?>
anyone can help me? I prefer to avoid use the REST APIs
thanks