Code Duplication    Length = 8-8 lines in 2 locations

src/Controllers/UsersController.php 2 locations

@@ 433-440 (lines=8) @@
430
        // Get the user information
431
        $user = Sentinel::findUserById($id);
432
433
        if ($user == null)
434
        {
435
            // Prepare the error message
436
            $error = Lang::get('base.auth.not_found');
437
438
            // Redirect to the user management page
439
            return Redirect::route('users')->with('error', $error);
440
        }
441
442
        $possibleStatus = $this->status;
443
@@ 511-518 (lines=8) @@
508
        // Get user information
509
        $user = Sentinel::findById($id);
510
511
        if ($user == null)
512
        {
513
            // Prepare the error message
514
            $error = Lang::get('base.auth.not_found');
515
516
            // Redirect to the user management page
517
            return Redirect::route('users')->with('error', $error);
518
        }
519
520
        // Check if we are not trying to delete ourselves
521
        if ($user->id === Sentinel::getUser()->id) {