Changeset 0a1fb54 for app/Http/Middleware
- Timestamp:
- 11/23/21 22:01:52 (3 years ago)
- Branches:
- master
- Children:
- dbc5976
- Parents:
- 4d73966
- Location:
- app/Http/Middleware
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
app/Http/Middleware/Authenticate.php
r4d73966 r0a1fb54 16 16 { 17 17 if (! $request->expectsJson()) { 18 return route('auth. loginShow');18 return route('auth.showLogin'); 19 19 } 20 20 } -
app/Http/Middleware/CheckCreatePassword.php
r4d73966 r0a1fb54 24 24 25 25 if($user->is_active) { 26 return redirect()->route("auth. loginShow");26 return redirect()->route("auth.showLogin"); 27 27 } 28 28 29 29 if(!$user->is_forgot_password) { 30 if(Carbon::now()->greaterThan($user->created_at->addMinutes(1 0))) {31 return redirect()->route("auth. loginShow");30 if(Carbon::now()->greaterThan($user->created_at->addMinutes(180))) { 31 return redirect()->route("auth.showLogin"); 32 32 } 33 33 } -
app/Http/Middleware/CheckIsActive.php
r4d73966 r0a1fb54 24 24 auth()->logout(); 25 25 26 return redirect()->route("auth. loginShow");26 return redirect()->route("auth.showLogin"); 27 27 } 28 28 -
app/Http/Middleware/CheckVerifyNewEmail.php
r4d73966 r0a1fb54 23 23 24 24 if($user->is_active) { 25 return redirect()->route("auth. loginShow");25 return redirect()->route("auth.showLogin"); 26 26 } 27 27 -
app/Http/Middleware/CheckVerifyToken.php
r4d73966 r0a1fb54 6 6 use App\Services\Hashid; 7 7 use Closure; 8 use Illuminate\Support\Carbon; 8 9 9 10 class CheckVerifyToken … … 23 24 $user = User::findOrFail($hashId->decode($id)); 24 25 25 if ($user->verify_token !== $token || now()->greaterThan($user->updated_at->addMinutes(1))) {26 if ($user->verify_token !== $token || Carbon::now()->greaterThan($user->updated_at->addMinutes(1))) { 26 27 return redirect()->route("auth.login"); 27 28 }
Note:
See TracChangeset
for help on using the changeset viewer.