By Gavin Costin on Wednesday, 25 October 2017
Posted in Technical Issues
Replies 3
Likes 0
Views 522
Votes 0
I need to be able to send a message from within my custom code to a particular ES user given his $user->id. Is there a member or tunction that I can invoke to get this done easily?
Here's something that can help you get started with:

[gist]
<?php
require_once(JPATH_ROOT . '/administrator/components/com_easysocial/includes/easysocial.php');

$conversation = ES::conversation();
$data = array(
'message' => 'hello world',
'uid' => $targetUserId
);

$conversation->bind($data);
$conversation->save();
[/gist]

You can look at the bind method in /administrator/components/com_easysocial/includes/conversation/conversation.php if you want something fancy
·
Wednesday, 25 October 2017 23:09
·
0 Likes
·
0 Votes
·
0 Comments
·
This was working before - now it is not Im using version 2.1.6
·
Thursday, 22 March 2018 21:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Gavin,

It looks like your subscription has expired and in order for you to continue requesting for support, you will need an active subscription. If you have already renewed, please let us know so that we can correct this for your account.

Thank you for understanding.
·
Thursday, 22 March 2018 23:36
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post