-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev-createUser.php
More file actions
23 lines (18 loc) · 938 Bytes
/
dev-createUser.php
File metadata and controls
23 lines (18 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
ini_set('display_errors', 1);
echo 'Create User on staging server using our API class<br />';
require(dirname(__FILE__) . "/Curl.php");
$R = new CurlRequestor();
$user = array(
'email' => 'user@plumvoice.com',
'password' => base64_encode('Pa55w0rd'),//this of course should all be part of a form that is first validated
'confirm_password' => base64_encode('Pa55w0rd'),//let's be sure to encrypt our passwords
'first_name' => 'John',
'last_name' => 'Doughe',//because I have a sense of humor
'street_number' => '1600 Pennsylvania Ave.',
'apartment_number' => '1',//this I am sure is optional
'city' => 'Washington',
'state' => 'DC'
);
$data = $R->CreateUser( $R->protocol() . '://staging-api.example.com', $user);//did not set up an SSL for this thats why the url is http and not https
print_r($data);