4_15_2019 update
This commit is contained in:
@@ -23,21 +23,28 @@ class TeamStoreController extends Controller {
|
||||
if (Auth::check()){
|
||||
$user_role = Auth::user()->role;
|
||||
$store_id = Auth::user()->store_id;
|
||||
}else{
|
||||
$user_role = null;
|
||||
$store_id = null;
|
||||
}
|
||||
|
||||
// if($request->session()->get('teamstore_data_array') == null){
|
||||
// if($store_id != $store_array[0]->Id){
|
||||
// return redirect()->back();
|
||||
// }
|
||||
// }else{
|
||||
|
||||
// if($user_role != "store_owner"){
|
||||
// if($request->session()->get('teamstore_data_array')[0]->StoreUrl != $store_array[0]->StoreUrl){
|
||||
// return redirect()->back();
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
if($store_array[0]->Password != null){
|
||||
if($request->session()->get('teamstore_data_array') == null){
|
||||
if($store_id != $store_array[0]->Id){
|
||||
return redirect('teamstore');
|
||||
}
|
||||
}else{
|
||||
|
||||
if($user_role != "store_owner"){
|
||||
if($request->session()->get('teamstore_data_array')[0]->StoreUrl != $store_array[0]->StoreUrl){
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach ($product_array as $p => $pr_arr) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user