Changeset 1859636
- Timestamp:
- 04/17/2018 09:05:09 AM (8 years ago)
- File:
-
- 1 edited
-
cometchat/trunk/includes/cometchat_cloud.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cometchat/trunk/includes/cometchat_cloud.php
r1859511 r1859636 68 68 * @param (type) no param 69 69 */ 70 /** 71 * cometchatUserDetails 72 * Return cc_base for user login 73 * @param (type) no param 74 */ 70 75 function cometchatUserDetails() { 71 76 global $cc_base; … … 78 83 $user_id = $current_user->ID; 79 84 $user_name = $current_user->user_login; 85 $display_name = $current_user->display_name; 80 86 $role = wp_get_current_user()->roles[0]; 87 81 88 preg_match('/< *img[^>]*src *= *["\']?([^"\']*)/i', get_avatar($user_id), $matches); 82 89 $avatar = $matches[1]; … … 86 93 $link = get_edit_user_link($user_id); 87 94 } 88 $user_info = array("id"=>$user_id,"n"=>$user_name,"a"=>$avatar,"l"=>$link,'role'=>$role); 95 $user_info = array( 96 "id" => $user_id, 97 "n" => $user_name, 98 "dn" => $display_name, 99 "a" => $avatar, 100 "l" => $link, 101 'role' => $role 102 ); 89 103 $cc_base = json_encode($user_info); 90 104 }
Note: See TracChangeset
for help on using the changeset viewer.