47 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
require_once 'SASConnector.php';
 | 
						|
 | 
						|
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
 | 
						|
$api->login();
 | 
						|
 | 
						|
 | 
						|
$res = $api->post('user/id', [
 | 
						|
    "enabled" => 1,
 | 
						|
    "password" => null,
 | 
						|
    "confirm_password" => null,
 | 
						|
    "profile_id" => 3,
 | 
						|
    "parent_id" => 2,
 | 
						|
    "site_id" => null,
 | 
						|
    "mac_auth" => 0,
 | 
						|
    "allowed_macs" => null,
 | 
						|
    "use_separate_portal_password" => 0,
 | 
						|
    "portal_password" => null,
 | 
						|
    "group_id" => null,
 | 
						|
    "firstname" => "John 2",
 | 
						|
    "lastname" => "Smith",
 | 
						|
    "company" => "SomeCompanyName",
 | 
						|
    "email" => "john.smith@company.com",
 | 
						|
    "phone" => "2983422",
 | 
						|
    "city" => "Istanbul",
 | 
						|
    "address" => "address_goes_here",
 | 
						|
    "apartment" => "34",
 | 
						|
    "street" => "93",
 | 
						|
    "contract_id" => "4938457938",
 | 
						|
    "national_id" => null,
 | 
						|
    "notes" => null,
 | 
						|
    "auto_renew" => 0,
 | 
						|
    "expiration" => "2023-01-11 14:15:44",
 | 
						|
    "simultaneous_sessions" => 1,
 | 
						|
    "static_ip" => null,
 | 
						|
    "mikrotik_winbox_group" => null,
 | 
						|
    "mikrotik_framed_route" => null,
 | 
						|
    "mikrotik_addresslist" => null,
 | 
						|
    "mikrotik_ipv6_prefix" => null,
 | 
						|
    "user_type" => 0,
 | 
						|
    "restricted" => 0
 | 
						|
 | 
						|
]);
 | 
						|
 | 
						|
print_r(json_decode($res));
 |