���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
repositories
/
portal-cutunix
/
modules
/
Identity
/
Http
/
Controllers
/
Viewing: AuthController.php
<?php namespace Modules\Identity\Http\Controllers; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Hash; use Modules\Tenancy\Models\Tenant; use Modules\Identity\Models\User; use Spatie\Multitenancy\Models\Tenant; class AuthController extends Controller { public function showTenantLogin() { return view('Identity::tenant.auth.login'); } public function tenantLogin(Request $request) { $serviceTenant = Tenant::where('code', $request->tenant_code)->first(); if (is_null($serviceTenant)) { $this->throwValidationException(); } $tenant = null; if ($serviceTenant) { $tenant = Tenant::where('id', $serviceTenant->tenant_id)->first(); if (is_null($tenant)) { $this->throwValidationException(); } } $user = User::where('email', $request->email)->first(); if (is_null($user)) { $this->throwValidationException(); } $hashChecked = Hash::check( $request->password, $user->password ); if (!$hashChecked || !$serviceTenant->hasEmployee($user)) { $this->throwValidationException(); } $staff = $serviceTenant->getCurrentEmployee($user); Auth::guard('tenant')->login($staff); $tenant->makeCurrent(); return redirect()->route('tenants.dashboard', $tenant); } public function showAdminLogin() { dump(Auth::guard('tenant')->check()); return view('Identity::admin.auth.login'); } public function adminLogin(Request $request) { } public function throwValidationException() { dd('کد کارگاه مورد نظر یا اطلاعات کاربر صحیح نیست؛ با مدیریت کارگاه تماس بگیرید'); } }
Coded With 💗 by
0x6ick Mod By V1rus_Alfa