improved security for impex

(cherry picked from commit f1149b712a)
pull/36/head
A1Gard 1 year ago
parent e8234d01fe
commit 232c6f1d76

@ -375,9 +375,15 @@ class ImpexController extends Controller
} }
public function login(){ public function login(){
if (!auth()->check()){
return abort(403);
}
return \Auth::guard('customer')->loginUsingId(Customer::inRandomOrder()->first()->id); return \Auth::guard('customer')->loginUsingId(Customer::inRandomOrder()->first()->id);
} }
public function loginas($tel){ public function loginas($tel){
if (!auth()->check()){
return abort(403);
}
return \Auth::guard('customer')->loginUsingId(Customer::whereMobile($tel)->first()->id); return \Auth::guard('customer')->loginUsingId(Customer::whereMobile($tel)->first()->id);
} }
} }

Loading…
Cancel
Save