diff --git a/lib/wechatapi/wechatapi.class.php b/lib/wechatapi/wechatapi.class.php index 80b4f1bb93..ae867a2117 100644 --- a/lib/wechatapi/wechatapi.class.php +++ b/lib/wechatapi/wechatapi.class.php @@ -59,7 +59,7 @@ class wechatapi $users = array(); foreach($depts->deptList as $deptID) { - $response = $this->queryAPI($this->apiUrl . "user/simplelist?access_token={$this->token}&department_id={$deptID}"); + $response = $this->queryAPI($this->apiUrl . "user/simplelist?access_token={$this->token}&department_id={$deptID}&fetch_child=1"); if($this->isError()) return array('result' => 'fail', 'message' => $this->errors); foreach($response->userlist as $user) $users[$user->name] = $user->userid;