fixed company on the registration form

This commit is contained in:
2026-02-19 17:09:10 +01:00
parent ac14f7083b
commit fc871dcd75

View File

@@ -59,4 +59,21 @@ class Partnerexpo_Core_User_Fields extends Partnerexpo_Core {
update_user_meta( $user_id, 'company', sanitize_text_field( $_POST[ 'company' ] ?? '' ) ); update_user_meta( $user_id, 'company', sanitize_text_field( $_POST[ 'company' ] ?? '' ) );
} }
} }
function registration_form() {
?>
<p>
<label for="company"><?php _e( 'Cég neve', 'partnerexpo-core' ) ?><br />
<input type="text" name="company" id="company" class="input" value="" size="25" /></label>
</p>
<?php
}
function registration_errors( $errors, $sanitized_user_login, $user_email ) {
if ( empty( $_POST['company'] ) || ! empty( $_POST['company'] ) && trim( $_POST['company'] ) == '' ) {
$errors->add( 'company_error', sprintf('<strong>%s</strong>: %s',__( 'Error', 'partnerexpo-core' ),__( 'Cég megadása kötelező!', 'partnerexpo-core' ) ) );
}
return $errors;
}
} }