Robust
Well-known member
So I use the following code:
The user gets the alerts, but they are always empty. When I hover over alerts, it just disappears and shows none, and when I go to show all alerts they're not there, but when it's initially processed (before marking them as 'read') it shows the number beside the "Alert" text.
What's up? Never had this problem with alerts before. It's a custom alert handler, which does this:
(canViewAlert -> true)
That method returns:
A little urgent, so thanks for any help I can get
Code:
XenForo_Model_Alert::alert(
$user['user_id'],
$user['user_id'],
$user['username'],
'task_completion',
$user['user_id'],
'completed'
);
The user gets the alerts, but they are always empty. When I hover over alerts, it just disappears and shows none, and when I go to show all alerts they're not there, but when it's initially processed (before marking them as 'read') it shows the number beside the "Alert" text.
What's up? Never had this problem with alerts before. It's a custom alert handler, which does this:
(canViewAlert -> true)
Code:
public function getContentByIds(array $contentIds, $model, $userId, array $viewingUser)
{
return $model->getModelFromCache('Model_Class')->getTasksByTaskIds($contentIds);
}
That method returns:
Code:
public function getTasksByTaskIds(array $taskIds)
{
return $this->fetchAllKeyed('
SELECT *
FROM aupp_task AS task
WHERE task_id IN ('. $this->_getDb()->quote($taskIds) .')
', 'task_id');
}
A little urgent, so thanks for any help I can get