diff --git a/create_user.php b/create_user.php index 1bcda7d..af6896d 100644 --- a/create_user.php +++ b/create_user.php @@ -9,8 +9,8 @@ $api->login(); $res = $api->post('user', [ "username" => "testusertest23", "enabled" => 1, - "password" => null, - "confirm_password" => null, + "password" => "asdfghjkl", + "confirm_password" => "asdfghjkl", "profile_id" => 2, "parent_id" => 1, "site_id" => null, @@ -43,3 +43,52 @@ $res = $api->post('user', [ "restricted" => 0 ]); print_r(json_decode($res)); + + + +//this is the expected response + +//stdClass Object +//( +// [status] => 200 +// [message] => rsp_save_success +// [data] => stdClass Object +// ( +// [username] => testusertest23 +// [enabled] => 1 +// [profile_id] => 2 +// [parent_id] => 1 +// [site_id] => +// [mac_auth] => 0 +// [use_separate_portal_password] => 0 +// [group_id] => 3 +// [firstname] => +// [lastname] => +// [company] => +// [email] => +// [phone] => +// [city] => +// [address] => +// [apartment] => +// [street] => +// [contract_id] => +// [national_id] => +// [notes] => +// [auto_renew] => 0 +// [expiration] => 2023-07-23 09:57:54 +// [simultaneous_sessions] => 1 +// [static_ip] => +// [mikrotik_winbox_group] => +// [mikrotik_framed_route] => +// [mikrotik_addresslist] => +// [mikrotik_ipv6_prefix] => +// [user_type] => 0 +// [restricted] => 0 +// [created_by] => 1 +// [updated_at] => 2023-07-23 10:45:50 +// [created_at] => 2023-07-23 10:45:50 +// [id] => 9786 +// [parent_username] => admin +// ) +// +//)