Code Duplication    Length = 5-5 lines in 2 locations

src/Controller/UsersController.php 2 locations

@@ 593-597 (lines=5) @@
590
            })
591
            ->first();
592
593
        if (is_null($user) || $user->is_deleted == true) {
594
            $this->Flash->error(__('This user doesn\'t exist or has been deleted.'));
595
596
            return $this->redirect(['controller' => 'pages', 'action' => 'home']);
597
        }
598
599
        $this->set(compact('user'));
600
    }
@@ 761-765 (lines=5) @@
758
            ])
759
            ->first();
760
761
        if (is_null($user)) {
762
            $this->Flash->error(__("This code is not associated with this users or is incorrect."));
763
764
            return $this->redirect(['controller' => 'pages', 'action' => 'home']);
765
        }
766
767
        $expire = $user->password_code_expire->timestamp + (Configure::read('User.ResetPassword.expire_code') * 60);
768