WordPress.org

Ready to get started?Download WordPress

Forums

Cimy User Extra Fields
[resolved] ERROR: Typed code is not correct & other validation errors (4 posts)

  1. KZeni
    Member
    Posted 1 year ago #

    I am running Cimy User Extra Fields v2.5.0 on a WordPress MS setup, and I'm using the securimage captcha.

    The captcha is shown correctly & works properly on the public user registration form, but the Add User option in the dashboard was also getting blocked by the captcha (the actual captcha not being shown). I had updated from 2.4 to 2.5 of the plugin to see if that fixed it, but it didn't.

    I ended up updating cimy_uef_register.php at line 625 (the cimy_registration_captcha_check function's conditional statement for giving certain forms a pass on the captcha) so that it excludes the admin forms from the captcha check.

    It was changed from:

    if (!empty($_POST['register_confirmation']) && ($_POST['register_confirmation'] == 2) && (wp_verify_nonce($_REQUEST['confirm_form_nonce'], 'confirm_form')))

    To:

    if ((!empty($_POST['register_confirmation']) && ($_POST['register_confirmation'] == 2) && (wp_verify_nonce($_REQUEST['confirm_form_nonce'], 'confirm_form'))) || (!empty($_POST['_wpnonce_create-user']) || !empty($_POST['_wpnonce_add-user'])))

    This is a hack that works for me, and I thought I should report this in case anyone else is experiencing this issue, or if you know of a better fix for this.

    As an aside, the network admin's add new user form is also getting caught by the extra fields that were marked as required (ex. "ERROR: First name couldn’t be empty." when that field isn't shown in that form). This might be related as it's an issue with form validation within the site admin, but I got the most pressing issue solved with the hack shown above.

    Any input/feedback would be greatly appreciated. Thanks!

    http://wordpress.org/extend/plugins/cimy-user-extra-fields/

  2. Marco Cimmino
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks, finally someone told me how to reproduce it, the key was WordPress MS, since I cannot reproduce with non-MS.

  3. Marco Cimmino
    Member
    Plugin Author

    Posted 1 year ago #

    Fixed in v2.5.1

  4. KZeni
    Member
    Posted 1 year ago #

    Great! Thanks Marco!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.