asprin
Active member
I'm using the following the code to send an alert to a user:
This successfully inserts the
I created a template named
The problem is that the alert does show up but without the
What am I missing here?
PHP:
$userId = 1;
$user = \XF::app()->find('XF:User', $userId);
$alertRepo = \XF::app()->repository('XF:UserAlert');
$alertRepo->alert($user, 2, 'asprin', 'user', $user->user_id, 'vcash', array('won'=>54335));
This successfully inserts the
$extra[]
data in the table as shown below:I created a template named
alert_user_vcash
with the following text:The problem is that the alert does show up but without the
$won
value.What am I missing here?