|
@@ -96,15 +96,17 @@ class LoginController extends Controller
|
|
|
$user = GlobalUserInfo::query()->where('RegionID', $config->isRegionUnique())->where("Phone", $Phone)->first();
|
|
$user = GlobalUserInfo::query()->where('RegionID', $config->isRegionUnique())->where("Phone", $Phone)->first();
|
|
|
if ($user) {
|
|
if ($user) {
|
|
|
$user = GlobalUserInfo::toWebData($user);
|
|
$user = GlobalUserInfo::toWebData($user);
|
|
|
- Util::WriteLog('phone_login',['success',$Phone,$config]);
|
|
|
|
|
|
|
+ Util::WriteLog('phone_login',['success',$user,$config]);
|
|
|
$this->dispatchIpRiskCheck($user['UserID'] ?? 0);
|
|
$this->dispatchIpRiskCheck($user['UserID'] ?? 0);
|
|
|
return response()->json(apiReturnSuc($user, ['login.success', 'Login bem-sucedido, bem-vindo de volta!']));//->withCookie($this->setLoginCookie($user['sign']));
|
|
return response()->json(apiReturnSuc($user, ['login.success', 'Login bem-sucedido, bem-vindo de volta!']));//->withCookie($this->setLoginCookie($user['sign']));
|
|
|
} else {
|
|
} else {
|
|
|
$user = GlobalUserInfo::query()->where("Phone", $Phone)->first();
|
|
$user = GlobalUserInfo::query()->where("Phone", $Phone)->first();
|
|
|
if($user){
|
|
if($user){
|
|
|
|
|
+ $user = GlobalUserInfo::toWebData($user);
|
|
|
|
|
+ Util::WriteLog('phone_login',['success',$user,$config]);
|
|
|
return response()->json(apiReturnSuc($user, ['login.success', 'Login bem-sucedido, bem-vindo de volta!']));//->withCookie($this->setLoginCookie($user['sign']));
|
|
return response()->json(apiReturnSuc($user, ['login.success', 'Login bem-sucedido, bem-vindo de volta!']));//->withCookie($this->setLoginCookie($user['sign']));
|
|
|
}
|
|
}
|
|
|
- Util::WriteLog('phone_login',[$Phone,$config]);
|
|
|
|
|
|
|
+ Util::WriteLog('phone_login',['fail',$Phone,$config, $config->isRegionUnique()]);
|
|
|
return apiReturnFail(['web.login.notfound', 'Sua conta não foi encontrada, registre-se ou tente novamente!']);
|
|
return apiReturnFail(['web.login.notfound', 'Sua conta não foi encontrada, registre-se ou tente novamente!']);
|
|
|
}
|
|
}
|
|
|
|
|
|