Sending a PM to specific user drom code ? #117
Replies: 4 comments 1 reply
-
|
Does this help: 14.7 Description of uddeIM API 14.7.3.8 sendNewSysMessage() Method: Description: Parameters: |
Beta Was this translation helpful? Give feedback.
-
|
Yes, what I finally did is extended uddeIMAPI class with my own and created a new version of sendNewSysMessage() (named sendNewSysMessageSingle()) by just copying the sendNewSysMessage code and changing g.id to u.id in query (actually removed all the "if" code for admin and other group leaving this last "else" case only. |
Beta Was this translation helpful? Give feedback.
-
|
Updated the API: // v6: function sendNewSysMessage($fromid, $recipients, $message, $systemmsg=0, $validfor=0, $sendnotification=0, $forceembedded=0, $onerecipient=0) |
Beta Was this translation helpful? Give feedback.
-
|
Please report if it works |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I need to send a PM from "System" to specific user from my code using uddeIM .
If I use "NewMessage()" it arrives from the user currently executing script, but I want from System. If I just use from = 0 , then it arrives from Guest ...
Obviously I can just do something like sendNewSysMessage() :
But this would require to modify sendNewSysMessage query to something like:
lse { $sql="SELECT DISTINCT u.id FROM (#__users AS u INNER JOIN#__user_usergroup_mapAS um ON u.id=um.user_id) INNER JOIN#__usergroupsAS g ON um.group_id=g.id WHERE u.block=0 AND u.id=".(int)$recipients; }(note change from g.id= to u.id="
And I do not want to "kernel hack" uddeIM code, is there a "proper" way to do this ?
Beta Was this translation helpful? Give feedback.
All reactions