simpan data allowed ids di table settingdatafixed_m
This commit is contained in:
parent
bc397b828e
commit
7beb47ef68
@ -6,6 +6,7 @@ use Illuminate\Http\Request;
|
|||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use App\Models\MasterPitStopPraAkre;
|
use App\Models\MasterPitStopPraAkre;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
class AuthController extends Controller
|
class AuthController extends Controller
|
||||||
{
|
{
|
||||||
@ -22,10 +23,13 @@ class AuthController extends Controller
|
|||||||
'password' => 'required'
|
'password' => 'required'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$allowedIds = [
|
// $allowedIds = [
|
||||||
727,1755,2184,2549,993,3053,2319,1995,2011,2145,1113,2998,592,442,2787,1600,1109,2676,566,640,1109,868,2370,2342,1028,1079,2007,735,950,994,1069,1358,890,2291,1310,98,800,
|
// 727,1755,2184,2549,993,3053,2319,1995,2011,2145,1113,2998,592,442,2787,1600,1109,2676,566,640,1109,868,2370,2342,1028,1079,2007,735,950,994,1069,1358,890,2291,1310,98,800,
|
||||||
2006,299265,892,2005,2531,2457,508,2147,401,1331,1430,1067,193,1071,639,1028,419,2626,2793,910,2055,645,637,325,365,1220,724,122,2371,1628,952,1323,793,1113,1058,316,979,748,30025,928,566,501,
|
// 2006,299265,892,2005,2531,2457,508,2147,401,1331,1430,1067,193,1071,639,1028,419,2626,2793,910,2055,645,637,325,365,1220,724,122,2371,1628,952,1323,793,1113,1058,316,979,748,30025,928,566,501,
|
||||||
59,217,2016,1173,707,30020,2147,401,1069,1335,1347,2147,401,1150,2194,2641,937,2640,1320,256,1716,2258,439,1067,519,550,975,2413,1050,890916,8056,561,1689,577,2293,959,1633,671,1358,890,833,2345,861,1528,2698,2115,2333,1696,1310,2790,1604,1288,2020,1137,142,2531,2457,897,81,1037,1429,3062,110,245,2371,1628];
|
// 59,217,2016,1173,707,30020,2147,401,1069,1335,1347,2147,401,1150,2194,2641,937,2640,1320,256,1716,2258,439,1067,519,550,975,2413,1050,890916,8056,561,1689,577,2293,959,1633,671,1358,890,833,2345,861,1528,2698,2115,2333,1696,1310,2790,1604,1288,2020,1137,142,2531,2457,897,81,1037,1429,3062,110,245,2371,1628];
|
||||||
|
// IdAllowedLoginPitstop
|
||||||
|
$allowedIdsRaw = DB::table('settingdatafixed_m')->where('namafield', 'IdAllowedLoginPitstop')->value('nilaifield');
|
||||||
|
$allowedIds = json_decode($allowedIdsRaw, true);
|
||||||
$user = User::where('namauser', $request->namauser)->first();
|
$user = User::where('namauser', $request->namauser)->first();
|
||||||
if (!in_array($user->id, $allowedIds)) {
|
if (!in_array($user->id, $allowedIds)) {
|
||||||
return back()->with(['error' => 'Akun Anda tidak diizinkan login']);
|
return back()->with(['error' => 'Akun Anda tidak diizinkan login']);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user