OsKaR
Member
Hi, I'm testing for customization XenForo, to see if you can lend a hand with the following code:
I get error and does not update the field trophy_points.
A greeting.
PHP:
class Puntos_ControllerPublic_Thread extends XFCP_Puntos_ControllerPublic_Thread
{
public function actionAddReply()
{
// get parent
$parent = parent::actionAddReply();
// get userId
$userId = XenForo_Visitor::getUserId();
$points = '10';
// conex db
$db = $this->_getDb();
// sumar puntos
$db->query('UPDATE xf_user SET trophy_points = trophy_points+? WHERE user_id = ?', array($points, $userId));
return $parent;
}
}
I get error and does not update the field trophy_points.
A greeting.