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

bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • app/Http/Controllers/Dashboard/UsersController.php

    r4d73966 r0a1fb54  
    2727        return view("dashboard.users.index")->with([
    2828            "users" => User::all(),
    29             "roles" => Role::all(),
    30             "adminAndReferents" => User::where("role_id", 1)->orWhere("role_id", 2)->get()
    31         ]);
    32     }
    33 
    34     public function create()
    35     {
    36         return view("dashboard.users.create")->with([
    37             "roles" => Role::all(),
     29            "roles" => Role::all()
    3830        ]);
    3931    }
     
    7769    }
    7870
    79     public function editShow($id)
    80     {
    81         return view("dashboard.users.edit")->with([
    82             "user" => User::findOrFail($id),
    83             "roles" => Role::all(),
    84         ]);
    85     }
    86 
    8771    public function edit(UpdateUserRequest $request, $id)
    8872    {
     
    11094
    11195        if($user->isDirty('email')) {
     96            $user->is_active = false;
     97            $user->security_code = $user->generateSecurityCode();
     98            $user->verify_token = $user->generateVerifyToken();
    11299            $user->notify(new VerifyNewEmail($user));
    113100        }
     101
    114102        $user->save();
    115103
Note: See TracChangeset for help on using the changeset viewer.