| xqd
@@ -115,7 +115,7 @@ class AuthorizationsController extends Controller
|
|
|
//登录操作
|
|
|
public function do_login($mobile,$password=null){
|
|
|
if(!empty($password)){
|
|
|
- if (!$user=User::where(['mobile' => $mobile])->first()) {
|
|
|
+ if (!$user=User::query()->where(['mobile' => $mobile])->whereNull('deleted_at')->first()) {
|
|
|
throw new Exception("用户不存在");
|
|
|
}
|
|
|
$credentials = ['mobile'=>$mobile,'password'=>$password];
|
| xqd
@@ -127,7 +127,7 @@ class AuthorizationsController extends Controller
|
|
|
User::firstOrCreate([
|
|
|
'mobile' => $mobile,
|
|
|
]);
|
|
|
- $user = User::query()->where(['mobile'=>$mobile])->first();
|
|
|
+ $user = User::query()->where(['mobile'=>$mobile])->whereNull('deleted_at')->first();
|
|
|
}
|
|
|
|
|
|
if (!$user->ycode) {
|