| Method Description |
By requesting this method, the user list can be obtained according to departments. |
|||||||||
| Example |
public function getUserList()
{
include_once('../vendor/zentao/zentao.php');
$zentao = new \zentao();
$params = array('deptID' => 1); // request parameters
$extraFields = array('title', 'users'); // customized fields returned
$result = $zentao->getUserList($params, $extraFields);
return $result;
}
|
|||||||||
| Request | GET | |||||||||
| Method |
getUserList |
|||||||||
| Parameter |
|
|||||||||
| Result |
success | error | ||||||||
{
"status": 1,
"msg": "success",
"result": {
// the navbar of ZenTao
"title": "Company-Department",
// users of a department【list all users if no parameter is passed】
"users": [
{
"id": "16",// user ID
"dept": "48",// department ID
"account": "Jack6",//username
"role": "dev",// user privilege
"realname": "jack6",// real name
"nickname": "",// user nickname
"commiter": "http://jack2019.com",
"avatar": "",
"birthday": "0000-00-00",// date of birth
"gender": "m",// sex【m/f】
"email": "[email protected]",// Email address
"skype": "",
"qq": "",
"mobile": "",
"phone": "",
"weixin": "",
"dingding": "",
"slack": "",
"whatsapp": "",
"address": "",
"zipcode": "",
"join": "2019-11-11",// join date
"visits": "0",
"ip": "",
"last": "0",
"fails": "0",
"locked": "0000-00-00 00:00:00",
"ranzhi": "",
"score": "0",
"scoreLevel": "0",
"deleted": "0",
"clientStatus": "offline",
"clientLang": "zh-cn"
}
]
}
}
|
{
"status": 0,
"msg": "error",
"result": []
}
|
|||||||||