|
@@ -50,7 +50,7 @@ class LoginController extends Controller
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
- $RegisterLocation = $request->country ?? env('COUNTRY_CODE','1');
|
|
|
|
|
|
|
+ $RegisterLocation = $request->country ?? env('COUNTRY_CODE','52');
|
|
|
$Phone = $request->phone;
|
|
$Phone = $request->phone;
|
|
|
$PhoneCode = $request->code;
|
|
$PhoneCode = $request->code;
|
|
|
$PhoneCode= preg_replace('/\D/s', '', $PhoneCode);
|
|
$PhoneCode= preg_replace('/\D/s', '', $PhoneCode);
|
|
@@ -102,7 +102,7 @@ class LoginController extends Controller
|
|
|
|
|
|
|
|
$user = GlobalUserInfo::$me;
|
|
$user = GlobalUserInfo::$me;
|
|
|
|
|
|
|
|
- $RegisterLocation = $request->country ?? env('COUNTRY_CODE','1');
|
|
|
|
|
|
|
+ $RegisterLocation = $request->country ?? env('COUNTRY_CODE','52');
|
|
|
$Phone = $request->phone;
|
|
$Phone = $request->phone;
|
|
|
$PhoneCode = $request->code;
|
|
$PhoneCode = $request->code;
|
|
|
|
|
|
|
@@ -493,7 +493,7 @@ class LoginController extends Controller
|
|
|
private function checkPhoneCode(Request $request)
|
|
private function checkPhoneCode(Request $request)
|
|
|
{
|
|
{
|
|
|
$user=GlobalUserInfo::$me;
|
|
$user=GlobalUserInfo::$me;
|
|
|
- $RegisterLocation = $request->country ?? env('COUNTRY_CODE','55');
|
|
|
|
|
|
|
+ $RegisterLocation = $request->country ?? env('COUNTRY_CODE','52');
|
|
|
$userPhone="";
|
|
$userPhone="";
|
|
|
if($user&&isset($user->Phone)&&substr($user->Phone,0,2)==$RegisterLocation){
|
|
if($user&&isset($user->Phone)&&substr($user->Phone,0,2)==$RegisterLocation){
|
|
|
|
|
|
|
@@ -546,7 +546,7 @@ class LoginController extends Controller
|
|
|
if($check!==1){
|
|
if($check!==1){
|
|
|
return $check;
|
|
return $check;
|
|
|
}
|
|
}
|
|
|
- $RegisterLocation = $request->country ?? env('COUNTRY_CODE','55');
|
|
|
|
|
|
|
+ $RegisterLocation = $request->country ?? env('COUNTRY_CODE','52');
|
|
|
$user = GlobalUserInfo::getGameUserInfo("Phone", $RegisterLocation . $request->phone);
|
|
$user = GlobalUserInfo::getGameUserInfo("Phone", $RegisterLocation . $request->phone);
|
|
|
if(!$user||empty($user)){
|
|
if(!$user||empty($user)){
|
|
|
return $this->registerUser($request);
|
|
return $this->registerUser($request);
|
|
@@ -769,7 +769,7 @@ class LoginController extends Controller
|
|
|
return apiReturnFail(['web.login.password_empty', 'Por favor insira a senha!'], '', 302);
|
|
return apiReturnFail(['web.login.password_empty', 'Por favor insira a senha!'], '', 302);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $RegisterLocation = $request->country ?? env('COUNTRY_CODE','55');
|
|
|
|
|
|
|
+ $RegisterLocation = $request->country ?? env('COUNTRY_CODE','52');
|
|
|
|
|
|
|
|
if (strstr($request->account, '@')) {
|
|
if (strstr($request->account, '@')) {
|
|
|
$user = GlobalUserInfo::query()->where('RegionID', $config->isRegionUnique())->where("Email", $request->account)->first();
|
|
$user = GlobalUserInfo::query()->where('RegionID', $config->isRegionUnique())->where("Email", $request->account)->first();
|
|
@@ -807,7 +807,7 @@ class LoginController extends Controller
|
|
|
$Phone = str_replace(['-', ' '], '', $Phone);
|
|
$Phone = str_replace(['-', ' '], '', $Phone);
|
|
|
|
|
|
|
|
// Check if the number has 11 digits and the third character is 9
|
|
// Check if the number has 11 digits and the third character is 9
|
|
|
- if ($RegisterLocation == env('COUNTRY_CODE','1')) {
|
|
|
|
|
|
|
+ if ($RegisterLocation == env('COUNTRY_CODE','52')) {
|
|
|
// if (!preg_match('/^\d{2}9\d{8}$/', $Phone)) {
|
|
// if (!preg_match('/^\d{2}9\d{8}$/', $Phone)) {
|
|
|
// return apiReturnFail(['web.user.phone_fail', 'Not correct phone number'], '', 422);
|
|
// return apiReturnFail(['web.user.phone_fail', 'Not correct phone number'], '', 422);
|
|
|
// }
|
|
// }
|
|
@@ -958,7 +958,7 @@ class LoginController extends Controller
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$login_ip = IpLocation::getRealIp();
|
|
$login_ip = IpLocation::getRealIp();
|
|
|
- $RegisterLocation = $request->country ?? env('COUNTRY_CODE',55);
|
|
|
|
|
|
|
+ $RegisterLocation = $request->country ?? env('COUNTRY_CODE','52');
|
|
|
$ServerRegion = env('REGION_24680','sa-east');
|
|
$ServerRegion = env('REGION_24680','sa-east');
|
|
|
$Language = $request->lang ?? $request->getLocale();
|
|
$Language = $request->lang ?? $request->getLocale();
|
|
|
$Phone = $request->phone ?? "";
|
|
$Phone = $request->phone ?? "";
|
|
@@ -1234,7 +1234,7 @@ class LoginController extends Controller
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$login_ip = IpLocation::getRealIp();
|
|
$login_ip = IpLocation::getRealIp();
|
|
|
- $RegisterLocation = $request->country ?? env('COUNTRY_CODE',1);
|
|
|
|
|
|
|
+ $RegisterLocation = $request->country ?? env('COUNTRY_CODE','52');
|
|
|
$ServerRegion = env('REGION_24680','sa-east');
|
|
$ServerRegion = env('REGION_24680','sa-east');
|
|
|
$Language = $request->lang ?? $request->getLocale();
|
|
$Language = $request->lang ?? $request->getLocale();
|
|
|
|
|
|