33 lines
910 B
PHP
33 lines
910 B
PHP
<?php
|
|
|
|
namespace App\Controllers;
|
|
|
|
class WrenchAccount extends BaseController
|
|
{
|
|
|
|
|
|
public function CreateNewAccount(){
|
|
|
|
$out=[];
|
|
|
|
$raw_json = file_get_contents('php://input');
|
|
$raw_array = json_decode($raw_json, true);
|
|
$in = $raw_array;
|
|
|
|
$in["action"] = WRENCHBOARD_ACCOUNT_PENDING;
|
|
$in["street1"] = $in["streetaddress"];
|
|
$in["zipcode"] = $in["zip"];
|
|
if (!isset($in["country"]) || $in["country"]==""){
|
|
$in["country"] = "US";
|
|
}
|
|
$in["loc"] = $_SERVER["REMOTE_ADDR"];
|
|
$in["mobile"] = "MOBILE";
|
|
|
|
// $wrenchboard = new \App\Models\BackendModel();
|
|
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
|
$out['internal_return'] = $ret;
|
|
|
|
return $this->summaryReturnData($in,$out); //json_encode( $final_out );
|
|
|
|
}
|
|
} |