Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 673 Bytes

create-update_users.md

File metadata and controls

28 lines (22 loc) · 673 Bytes

Create/Update Users

Request Supported
Create User
Update User

Create User

use CodebarAg\DocuWare\Requests\General\UserManagement\CreateUpdateUsers\CreateUser;

$user = $connector->send(new CreateUser(new User(
    name: $timestamp.' - Test User',
    dbName: $timestamp,
    email: $timestamp.'[email protected]',
    password: 'TESTPASSWORD',
)))->dto();

Update User

use CodebarAg\DocuWare\Requests\General\UserManagement\CreateUpdateUsers\UpdateUser;

$user->name .= ' - Updated';
$user->active = false;

$user = $connector->send(new UpdateUser($user))->dto();