fix
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Controllers;
|
|||||||
use CodeIgniter\HTTP\URI;
|
use CodeIgniter\HTTP\URI;
|
||||||
use App\Services\FloatLogin;
|
use App\Services\FloatLogin;
|
||||||
use App\Services\UserProfile;
|
use App\Services\UserProfile;
|
||||||
|
use App\Services\ResetPassword;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -211,7 +212,9 @@ private function testCards(){
|
|||||||
$this->logArray($res);
|
$this->logArray($res);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'getdrycleanservicelist': $in["action"] = SAVVYEXT_USER_DRYCLIST;
|
case 'resetpass': $in["action"] = 10011111111;
|
||||||
|
$res = ResetPassword::procResetPassword($inx['accessToken']);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'createuser': $in["action"] = SAVVYEXT_USER_CREATE;
|
case 'createuser': $in["action"] = SAVVYEXT_USER_CREATE;
|
||||||
$in["street1"] = $in["streetaddress"];
|
$in["street1"] = $in["streetaddress"];
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use GuzzleHttp\Client as HTTPClient;
|
|||||||
class CoreServiceApi
|
class CoreServiceApi
|
||||||
{
|
{
|
||||||
|
|
||||||
public static function NodeServiceApi($url_path, $data){
|
public static function NodeServiceApi($url_path, $data_json){
|
||||||
|
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ public static function NodeServiceApi($url_path, $data){
|
|||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
curl_setopt($ch, CURLOPT_POST, 1);
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
// curl_setopt($ch, CURLOPT_POSTFIELDS, "{'username':'$username','password':'$password',\"sessionid\":\"DUMMYSESSION\"}");
|
// curl_setopt($ch, CURLOPT_POSTFIELDS, "{'username':'$username','password':'$password',\"sessionid\":\"DUMMYSESSION\"}");
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"username\":\"$username\",\"password\":\"$password\",\"sessionid\":\"DUMMYSESSION\"}");
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_json);
|
||||||
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
|
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
|
||||||
|
|
||||||
$headers = array();
|
$headers = array();
|
||||||
|
|||||||
@@ -9,6 +9,28 @@ class ResetPassword extends CoreServiceApi
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public static function procResetPassword($data)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
CRITICAL - 2022-04-20 19:46:44 --> username=>ses66181@gmail.com
|
||||||
|
CRITICAL - 2022-04-20 19:46:44 --> mode=>100
|
||||||
|
CRITICAL - 2022-04-20 19:46:44 --> reset_pin=>
|
||||||
|
CRITICAL - 2022-04-20 19:46:44 --> newpass=>
|
||||||
|
CRITICAL - 2022-04-20 19:46:44 --> reset_key=>
|
||||||
|
*/
|
||||||
|
|
||||||
|
"email": "lviet@float.sg",
|
||||||
|
"mode":100
|
||||||
|
$res =[];
|
||||||
|
switch($data['mode']){
|
||||||
|
|
||||||
|
case 100:
|
||||||
|
$data_json = "{\"email\":\"$$data['email']\",\"mode\":100}";
|
||||||
|
$res = $this->NodeServiceApi('/user/reset-password', $data_json);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $res;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user