uc_pm_send这个接口说明有问题
integer uc_pm_send(integer fromuid , string msgto , string subject , string message [, bool instantly , integer replypmid , bool isusername])
参数 含义
integer fromuid 发件人用户 ID,0 为系统消息
当fromuid为0的时候,是怎么也不会成功的,看了一下接口代码:
function onsendpm() {
$this->init_input();
$fromuid = $this->input('fromuid');
$msgto = $this->input('msgto');
$subject = $this->input('subject');
$message = $this->input('message');
$replypmid = $this->input('replypmid');
$isusername = $this->input('isusername');
$type = $this->input('type');
if(!$fromuid) {
return 0;
}
$user = $_ENV['user']->get_user_by_uid($fromuid);
$user = daddslashes($user, 1);
if(!$user) {
return 0;
}
得出结论,这丫的接口根本就发了系统消息 |