Code Duplication    Length = 5-5 lines in 2 locations

application/modules/auth/authapi.php 1 location

@@ 175-179 (lines=5) @@
172
            $key = random_string('alnum', 5);
173
            if ($val->run($this) AND $last_user = $this->dx_auth->register($val->set_value('username'), $val->set_value('password'), $val->set_value('email'), '', $key, '')) {
174
                // Set success message accordingly
175
                if ($this->dx_auth->email_activation) {
176
                    $data['auth_message'] = lang('You have successfully registered. Please check your email to activate your account.', 'auth');
177
                } else {
178
                    $data['auth_message'] = lang('You have successfully registered. ', 'auth') . anchor(site_url($this->dx_auth->login_uri), lang('Login', 'auth'));
179
                }
180
181
                Events::create()->registerEvent($last_user, 'AuthUser:register');
182
                Events::create()->runFactory();

application/modules/auth/auth.php 1 location

@@ 238-242 (lines=5) @@
235
            $key = random_string('alnum', 5);
236
            if ($val->run($this) AND $last_user = $this->dx_auth->register($val->set_value('username'), $val->set_value('password'), $val->set_value('email'), '', $key, '')) {
237
                // Set success message accordingly
238
                if ($this->dx_auth->email_activation) {
239
                    $data['auth_message'] = lang('You have successfully registered. Please check your email to activate your account.', 'auth');
240
                } else {
241
                    $data['auth_message'] = lang('You have successfully registered. ', 'auth') . anchor(site_url($this->dx_auth->login_uri), lang('Login', 'auth'));
242
                }
243
244
                Events::create()->registerEvent($last_user, 'AuthUser:register');
245
                Events::create()->runFactory();