Code Duplication    Length = 7-10 lines in 3 locations

user_account/controllers/insert_user_account.php 1 location

@@ 190-199 (lines=10) @@
187
        }
188
    }
189
190
    if (!$errors)
191
    {
192
        $app->flash('message', 'Account creation was successful. You will receive an email shortly with further instructions.');
193
        $app->redirect($final_global_template_vars["path_to_this_module"]."/register/");
194
    } 
195
    else
196
    {
197
        $env = $app->environment();
198
        $env["default_validation_errors"] = $errors;
199
    }
200
}
201

user_account/controllers/reset_password.php 1 location

@@ 39-45 (lines=7) @@
36
    $account_email_exists = false;
37
38
    // Is the email address in the database?
39
    if ($posted_data) {
40
        $account_email_exists = $register_account->account_email_exists($posted_data["user_account_email"]);
41
        if (!$account_email_exists) {
42
            $app->flash('message', 'The entered email address was not found in our database.');
43
            $app->redirect($final_global_template_vars["path_to_this_module"]."/password/");
44
        }
45
    }
46
47
    // If there are no errors, process posted data and email to user
48
    if ($account_email_exists && $posted_data) {

user_account/controllers/update_password.php 1 location

@@ 43-50 (lines=8) @@
40
    $account_email_exists = false;
41
42
    // Is the email address in the database?
43
    if ($post) {
44
        $account_email_exists = $register_account->account_email_exists($post["user_account_email"]);
45
46
        if (!$account_email_exists) {
47
            $app->flash('message', 'The entered email address was not found in our database.');
48
            $app->redirect($final_global_template_vars["path_to_this_module"]."/password/");
49
        }
50
    }
51
52
    $rules = array();
53