| Method Description |
Request this method to add a new user. Information about the user such as department, position, and privilege can be added. Optional parameters can be blank. |
|||||||||||||||||||||||||||||||||||||||||||||||||
| Example |
public function addUser()
{
include_once('zentao.php');
$zentao = new zentao();
$params = array(
'dept' => 1,
'account' => 'Jack10',
'password1' => '123456',
'password2' => '123456',
'realname' => 'Jack10',
'join' => '2019-11-11',
'role' => 'dev',
'group' => 2,
'email' => '[email protected]',
'commiter' => 'http://jack2019.com',
'gender' => 'm'
); // request parameters
$result = $zentao->addUser($params);
return $result;
}
|
|||||||||||||||||||||||||||||||||||||||||||||||||
| Request |
POST | |||||||||||||||||||||||||||||||||||||||||||||||||
| Method |
addUser | |||||||||||||||||||||||||||||||||||||||||||||||||
| Parameter |
|
|||||||||||||||||||||||||||||||||||||||||||||||||
| Result |
success | error | ||||||||||||||||||||||||||||||||||||||||||||||||
| {
"status": 1,
"msg": "success",
"result": "Saved"
} |
{ "status": 0, "msg": "error", "result": { "account": [ "『Username』 has『ly0011』existed. Go to Admin-Data-Recycle tp restore it if it has been deleted." ] } } | |||||||||||||||||||||||||||||||||||||||||||||||||
Add a single user
- 2022-12-21 10:12:53
- Kelsea
- 1646
- Last edited by on 2022-12-30 18:51:30
- Share links