Skip to content

Commit

Permalink
Remove redundant 'non-City-Tech' signup code check during registration.
Browse files Browse the repository at this point in the history
Placing the logic here means that the field is checked once the 'signup_validation_code'
element is added to the DOM, which can happen if you first enter a non-CT email
and then replace it with a CT one. The logic is redundant anyway, since validation
takes place later in the same function.

See #3245.
  • Loading branch information
boonebgorges committed Sep 19, 2023
1 parent cccd1a6 commit 5a9ea15
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions wp-content/plugins/wds-citytech/wds-register.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,6 @@ function wds_email_validate() {
return;
}

// Check code sigups first.
if ( isset( $_POST['signup_validation_code'] ) ) {
$is_valid = cac_ncs_validate_code( $_POST['signup_validation_code'] );

if ( ! $is_valid ) {
$bp->signup->errors['signup_email'] = 'Non-City Tech addresses need a valid registration code to sign up for the OpenLab.';
}

return;
}


$email = $_POST['signup_email'];
$email_parts = explode( '@', $email );
$domain = isset( $email_parts[1] ) ? stripslashes( $email_parts[1] ): '';
Expand Down

0 comments on commit 5a9ea15

Please sign in to comment.