用户修改信息后 给腾讯同步昵称和头像
This commit is contained in:
@@ -728,7 +728,7 @@ class Tencent extends Model
|
||||
}
|
||||
|
||||
//修改用户信息
|
||||
public function modify_user_info($member_id, $member_name = '', $member_face_url = '')
|
||||
public function modify_user_infos($member_id, $member_name, $member_face_url)
|
||||
{
|
||||
$config = get_system_config();
|
||||
$tencentyun_im_appid = $config['tencentyun_im_appid'];
|
||||
@@ -736,7 +736,7 @@ class Tencent extends Model
|
||||
$admin_sig = $this->tencent_user_sig_info($im_admin);
|
||||
$rand = rand(111111111,9999999999);
|
||||
$postUrl = 'https://console.tim.qq.com/v4/profile/portrait_set?sdkappid='.$tencentyun_im_appid.'&identifier='.$im_admin.'&usersig='.$admin_sig.'&random='.$rand.'&contenttype=json';
|
||||
$curlPost['From_Account'] = $member_id;
|
||||
$curlPost['From_Account'] = 'u'.$member_id;
|
||||
$curlPost['ProfileItem'] = [
|
||||
[
|
||||
'Tag' => 'Tag_Profile_IM_Nick',
|
||||
@@ -749,6 +749,7 @@ class Tencent extends Model
|
||||
];
|
||||
$curlPost = json_encode($curlPost);
|
||||
$reslut = $this->tencent_post_url($postUrl, $curlPost);
|
||||
Log::record("修改用户信息:".json_encode($reslut),"infos");
|
||||
if($reslut['ActionStatus'] == 'OK'){
|
||||
return ['code' => 1, 'msg' => '操作成功', 'data' => null];
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user