blob: f758c93c4797b452111ed1cd7945db2f7164a223 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<?
require('freeside.class.php');
$freeside = new FreesideSelfService();
$response = $freeside->new_agent( array(
'agent' => $_POST['agent'], #agent name
'username' => strtolower($_POST['username']),
'_password' => strtolower($_POST['password'])
) );
error_log("[new_agent] received response from freeside: $response");
$error = $response['error'];
if ( ! $error ) {
// sucessful signup
$session_id = $response['session_id'];
error_log("[new_agent] signup up agent");
} else {
// unsucessful signup
error_log("[new_agent] signup error: $error");
// display error message to user
}
?>
|