Code Duplication    Length = 12-12 lines in 2 locations

user_account/controllers/insert_update_user_account.php 1 location

@@ 66-77 (lines=12) @@
63
64
    $validated = $gump->validate($post, $rules);
65
66
    if ($post["user_account_password"] != $post["password_check"]) {
67
        $validated_password_check = array(
68
      "field" => "user_account_password_check"
69
      ,"value" => null
70
      ,"rule" => "validate_required"
71
    );
72
        if (is_array($validated)) {
73
            array_push($validated, $validated_password_check);
74
        } else {
75
            $validated = array($validated_password_check);
76
        }
77
    }
78
79
    $errors = array();
80
    if ($validated !== true) {

user_account/controllers/update_password.php 1 location

@@ 63-74 (lines=12) @@
60
61
    $validated = $gump->validate($post, $rules);
62
63
    if ($post["user_account_password"] != $post["password_check"]) {
64
        $validated_password_check = array(
65
            "field" => "user_account_password_check"
66
            ,"value" => null
67
            ,"rule" => "validate_required"
68
        );
69
        if (is_array($validated)) {
70
            array_push($validated, $validated_password_check);
71
        } else {
72
            $validated = array($validated_password_check);
73
        }
74
    }
75
76
    $errors = array();
77
    if ($validated !== true) {