Ignore:
Timestamp:
11/23/21 22:01:52 (3 years ago)
Author:
beratkjufliju <kufliju@…>
Branches:
master
Children:
dbc5976
Parents:
4d73966
Message:

bug fixes

Location:
app/Http/Middleware
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • app/Http/Middleware/Authenticate.php

    r4d73966 r0a1fb54  
    1616    {
    1717        if (! $request->expectsJson()) {
    18             return route('auth.loginShow');
     18            return route('auth.showLogin');
    1919        }
    2020    }
  • app/Http/Middleware/CheckCreatePassword.php

    r4d73966 r0a1fb54  
    2424
    2525        if($user->is_active) {
    26             return redirect()->route("auth.loginShow");
     26            return redirect()->route("auth.showLogin");
    2727        }
    2828
    2929        if(!$user->is_forgot_password) {
    30             if(Carbon::now()->greaterThan($user->created_at->addMinutes(10))) {
    31                 return redirect()->route("auth.loginShow");
     30            if(Carbon::now()->greaterThan($user->created_at->addMinutes(180))) {
     31                return redirect()->route("auth.showLogin");
    3232            }
    3333        }
  • app/Http/Middleware/CheckIsActive.php

    r4d73966 r0a1fb54  
    2424            auth()->logout();
    2525
    26             return redirect()->route("auth.loginShow");
     26            return redirect()->route("auth.showLogin");
    2727        }
    2828
  • app/Http/Middleware/CheckVerifyNewEmail.php

    r4d73966 r0a1fb54  
    2323
    2424        if($user->is_active) {
    25             return redirect()->route("auth.loginShow");
     25            return redirect()->route("auth.showLogin");
    2626        }
    2727
  • app/Http/Middleware/CheckVerifyToken.php

    r4d73966 r0a1fb54  
    66use App\Services\Hashid;
    77use Closure;
     8use Illuminate\Support\Carbon;
    89
    910class CheckVerifyToken
     
    2324        $user = User::findOrFail($hashId->decode($id));
    2425
    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))) {
    2627            return redirect()->route("auth.login");
    2728        }
Note: See TracChangeset for help on using the changeset viewer.