mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Fix user ID comparison with absint to ensure type safety
Updated the user ID comparison logic in the Ultimate Member plugin to use `absint` for both values. This prevents type mismatches and ensures robust validation during form submission.
This commit is contained in:
@@ -956,7 +956,7 @@ function um_submit_form_errors_hook_( $submitted_data, $form_data ) {
|
||||
|
||||
$the_similar_users = get_users( $args );
|
||||
foreach ( $the_similar_users as $user ) {
|
||||
if ( empty( $submitted_data['user_id'] ) || $user->ID !== $submitted_data['user_id'] ) {
|
||||
if ( empty( $submitted_data['user_id'] ) || absint( $user->ID ) !== absint( $submitted_data['user_id'] ) ) {
|
||||
UM()->form()->add_error( $key, __( 'The email you entered is incorrect', 'ultimate-member' ) );
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user