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
@@ 509-516 (lines=8) @@
506
        // Get user information
507
        $user = Sentinel::findById($id);
508
509
        if ($user == null)
510
        {
511
            // Prepare the error message
512
            $error = Lang::get('base.auth.not_found');
513
514
            // Redirect to the user management page
515
            return Redirect::route('users')->with('error', $error);
516
        }
517
518
        // Check if we are not trying to delete ourselves
519
        if ($user->id === Sentinel::getUser()->id) {