if ( $type == 'local' )
{
// WARNING: Note the typo in the name of the 'permittedcalls' column!
- $query_kamailio = sprintf ("SELECT id, username, domain, password, email_address, ha1, ha1b, rpid, permitedcalls FROM %s WHERE username = '%s' AND domain = '%s'",
+ $query_kamailio = sprintf ("SELECT id, username, domain, password, email_address, ha1, ha1b, rpid, permittedcalls FROM %s WHERE username = '%s' AND domain = '%s'",
$config['kamailio_subscriber_table'],
sql_clean($username),
sql_clean($domain));
delete_provision_user( $username, $domain );
// Give errormessage, and quit.
print json_encode( array( 'response' => 'failed', 'cause' => 'dbfail', 'detail' => 'Failed to read recently added data. Operations rolled back' ) );
-
+ break;
}
print json_encode( array( 'response' => 'ok', 'user' => $userdata ));
+ break;
}
else
print json_encode( array( 'response' => 'invalid', 'cause' => 'parameters' ) );
delete_provision_user( $username, $domain );
// Give errormessage, and quit.
print json_encode( array( 'response' => 'failed', 'cause' => 'dbfail', 'detail' => 'Failed to read recently added data. Operations rolled back' ) );
-
+ break;
}
print json_encode( array( 'response' => 'ok', 'user' => $userdata ));
+ break;
}
else
print json_encode( array( 'response' => 'invalid', 'cause' => 'parameters' ) );