* fix for get ding user.

This commit is contained in:
wangyidong
2020-05-12 17:36:08 +08:00
parent f4e378e7c4
commit 2f78e6a4f1
+5 -1
View File
@@ -62,7 +62,11 @@ class dingapi
foreach($depts as $deptID => $deptName)
{
$response = $this->queryAPI($this->apiUrl . "user/simplelist?access_token={$this->token}&department_id={$deptID}");
if($this->isError()) continue;
if($this->isError())
{
$this->getErrors();
continue;
}
foreach($response->userlist as $user) $users[$user->name] = $user->userid;
}