Get User List

2020-03-24 10:18:42
John Ten
1855
Final Edition:tengfei De 2020-03-24 16:16:07
Introduction:By requesting this method, the user list can be obtained according to departments.
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
Name Type Required Description

deptID

int Optional

Department ID

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": "jack2019@gmail.com",// 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": []
}

Commenter
Commentaires reçus après vérification。