* adjust for get dingding user.
This commit is contained in:
@@ -57,11 +57,12 @@ class dingapi
|
||||
$depts = $this->getAllDepts();
|
||||
if($this->isError()) return array('result' => 'fail', 'message' => $this->errors);
|
||||
|
||||
set_time_limit(0);
|
||||
$users = array();
|
||||
foreach($depts as $deptID => $deptName)
|
||||
{
|
||||
$response = $this->queryAPI($this->apiUrl . "user/simplelist?access_token={$this->token}&department_id={$deptID}");
|
||||
if($this->isError()) return array('result' => 'fail', 'message' => $this->errors);
|
||||
if($this->isError()) continue;
|
||||
|
||||
foreach($response->userlist as $user) $users[$user->name] = $user->userid;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user