Code Duplication    Length = 6-7 lines in 2 locations

application/modules/admin/login.php 1 location

@@ 32-37 (lines=6) @@
29
    }
30
31
    public function index() {
32
        if ($this->dx_auth->is_max_login_attempts_exceeded()) {
33
34
            $this->dx_auth->captcha();
35
            $this->template->assign('use_captcha', '1');
36
            $this->template->assign('cap_image', $this->dx_auth->get_captcha_image());
37
        }
38
39
        $this->load->library('user_agent');
40

application/modules/auth/auth.php 1 location

@@ 162-168 (lines=7) @@
159
                    $data['show_captcha'] = FALSE;
160
161
                    // Show captcha if login attempts exceed max attempts in config
162
                    if ($this->dx_auth->is_max_login_attempts_exceeded()) {
163
                        // Create catpcha
164
                        $this->dx_auth->captcha();
165
                        $this->template->assign('cap_image', $this->dx_auth->get_captcha_image());
166
                        // Set view data to show captcha on view file
167
                        $data['show_captcha'] = TRUE;
168
                    }
169
170
                    // Load login page view
171
                    if ($this->input->server('HTTP_X_REQUESTED_WITH') != 'XMLHttpRequest') {