diff --git a/lib/dingapi/dingapi.class.php b/lib/dingapi/dingapi.class.php index 13daecea38..fad581588e 100644 --- a/lib/dingapi/dingapi.class.php +++ b/lib/dingapi/dingapi.class.php @@ -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; }