- 1. API
- 2 Configuration
- 3. Department
-
4. User
- 4.1 Get Parameters of Add User
- 4.2 Add User
- 4.3 Get User List
- 5. Product
- 6. Project
-
7. Task
- 7.1 Get Task List
- 7.2 Get Task Optional Information
- 7.3 Add Task
- 7.4 Finish Task Optional Information
- 7.5 Finish Task
- 8. Bug
Add User
- 2020-03-24 10:18:15
- John Ten
- 3342
- Last edited by Taotao on 2020-03-24 14:42:39
- Share links
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." ] } } |
Write a Comment
Support
- Book a Demo
- Tech Forum
- GitHub
- SourceForge
About Us
- Company
- Privacy Policy
- Term of Use
- Blogs
- Partners
Contact Us
- Leave a Message
- Email Us: [email protected]