Conflicts Begone

As more users become aware of Register Plus Redux, more and more conflicts are coming in. Each time I receive notification I download the offending plugin and try to figure out, why this author did that, each time I’m left scratching my head. I’m sure any developer looking at Redux’s code for the first time would feel the same way. There’s no comments to guide you down the yellow brick road, no rhyme or reason either, it sometimes seems.

However, today, two completely different users came to me with two completely different questions, and between the two of them, I realized I’ve been dealing with these conflicts all wrong; I should be reducing my dependency on wp_new_user_notification. I tried to do that when I first starting developing Redux, but at that time I couldn’t make much sense of WordPress’ complicated code base. My how things change over two months. I now see the error in my ways.

The following functions are executed in order when a new user registers:

func register_new_user (wp-login)
func wp_create_user (registration)
func wp_insert_user (registration)
-> action user_register (registration)
func wp_new_user_notification (pluggable)

Previously the user metadata was taken from the $_POST and entered into the database within a defined wp_new_user_notification. Because of this, our wp_new_user_notification had to handle conditions where no changes were made. This could lead to problems in the future should WordPress change their default message I would need to modify Redux to reflect that. Not something I particularly want to keep track of (not that I even know how). Upon digging around, I found the user_register hook that happens within the wp_insert_user function, which happens just before wp_new_user_notification is triggered. Now Redux more appropriately does its metadata entry within the wp_insert_user function and only defines a wp_new_user_notification function if the user has enabled any options that modify the user or admin messages. As of 3.7.0, the following options will trigger Redux to define its own wp_new_user_notification:

verify_user_email
verify_user_admin
disable_user_message_registered
disable_user_message_created
custom_user_message
disable_admin_message_registered
disable_admin_message_created
custom_admin_message

Therefore, anyone taking advantage of those options still needs to worry about conflicting plugins, but otherwise, many users should see fewer conflicts.

This is a great change for the better and it wouldn’t have been possible without feedback from Tevya Washburn and Theron Welch. Redux wouldn’t be where it is today without dedicated users willing to report their troubles, questions, and ideas. Thank you to all the users. I’ll keep making this plugin the best it can be.

This entry was posted in Register Plus Redux. Bookmark the permalink.

23 Responses to Conflicts Begone

  1. AJBFerreira says:

    I am translating Register Plus Redux to pt_PT. I’ve created both register-plus-redux-pt_PT .po and .mo. However I am not able to see my latest translations! Possibly a conflict? I am using qTranslate to switch between languages.

    • radiok says:

      Is this a new problem? By that I mean, has your translation ever worked?

      • AJBFerreira says:

        Yes, it worked before with Reg Plus. Only strings processed by Reg Plus Redux are not translated. If you check the wp-login page in register action, you can see strings in Portuguese and in English in the Portuguese mode…

        • radiok says:

          Can you send the .po file to me (radiok at radiok.info), I’ll take a look at it.

          • AJBFerreira says:

            I will surely do it! By the way, you have managed great improvements on the previous Reg Plus plugin. Now is much better. Good work.

    • radiok says:

      Just to close this thread, the changes I discussed in http://radiok.info/blog/load_plugin_textdomain-timing/ appear to have solved this issue, AJBFerreira realized that within hours of me discussing this. Great minds must think alike!

    • sun says:

      Register Plus Redux – Thanks for your awesome plug-in. Akismet is a joke in that it still allows for spam comments to fill up your admin panel. Your registration plug-in requiring e-mail verification has cut down my comment spam to 0%. :) I just use a e-mail rule to delete the bounce back for the e-mail registration request. I never notice spam e-mail registration attempts now. Your plug-in is perfect. :)

  2. azazure says:

    I have marked the option for email verification with the supplied text to let users know to check their email to activate their account, but the notice never shows up. After they click on the register button it just takes them back to the home page and they don’t know what to do next. The user does get the verification email telling them to click on the link to activate but they don’t know to check their email to continue the registration process. Some kind of pop-up confirmation box telling the user to check their email would be great, they couldn’t miss it.

    This is a great plugin and would gladly donate to keep this thing going.

  3. BasJS says:

    Just like azazure, I have the same problem with the wrapping up the registration part. The username is now something like: “unverified_6FYD52X” and when clicking the verification link in the email, nothing happens so users can’t log in…

    As administrator I have no option to mark any of the newly registered as “approved”.

    Is this something common? Pls help… 8(

    • azazure says:

      Hi BasJS,

      I’ve actually managed to work through these issues so maybe I can help. Many times the verification emails go the users junk or spam mail which renders the links useless. They must either move the email back to their inbox to re-activate the verification link or copy the link into their browser. You are also able to manually verify these unverified users by going to the WP “Unverified Users” option and use the “Approve Selected Users” button. Since the notice to the user to look for a verification email does not work I had to do a manual hack to change the default “Register for this site here” text. You must edit the wp-login file in the root directory. I changed mine to “Register here for initial access to the features of this site. After completing this form, you will receive an email asking you to verify your email address. When you do so, your site registration will be complete. If the email is directed to your junk or spam folder, simply move it to your inbox to re-activate the verification link.” I hope this helps.

      • BasJS says:

        Thank you Azazur for your relpy!

        OMG I’m such an idiot! 8p I couldn’t find the “Unverified user” menu item in the admin panel! Oo So I couldn’t approve the new user!

        Sorry for the trouble I caused…

  4. Richard C says:

    I hope I am placing this in the correct spot on your site…

    I am developing a directory site via PremiumPress’s Directory Press themen and I keep getting a couple of error messages when I register new accounts:

    Warning: Missing argument 2 for RegisterPlusReduxPlugin::CheckRegistrationForm() in /home3/mysite/public_html/wp-content/plugins/register-plus-redux/register-plus-redux.php on line 1804

    Warning: Missing argument 3 for RegisterPlusReduxPlugin::CheckRegistrationForm() in /home3/mysite/public_html/wp-content/plugins/register-plus-redux/register-plus-redux.php on line 1804

    - These messages appear at the top of my site when registration is submitted.

    I am also having issues with the number of custom entry fields I can add to the Registration Page, and can not seem to get the Date Entry Field to work for Birthday mm/dd/yyyy – Have had to resort to a drop down Age button.

    Any thoughts and help with the above would be greatly appreciated!

    Richard

    • radiok says:

      Richard, your theme appears to be making heavy modifications to the registration page, if you were to temporarily change your theme I’m sure that the error would go away, and also that you would be able to use the date fields. There’s not much I can do from my end to work around a theme issue, especially with a pay theme, as I have no access to the source code.

      • Richard C says:

        Thanks! I will check with the PremiumPress folks.

        Have a great day.
        Richard

      • Jeff Banks says:

        Hello,

        Thank you for a fantastic plugin – I’m really appreciating the extended functionality.

        Unfort I’m getting *exactly* the same problem as Richard, above – the “missing argument” for CheckRegistrationForm.

        I built the theme from the ground up, and I’ve changed it back to TwentyTen, and still get the error message.

        I get the error no matter what form setup options I choose.

        Grateful for any assistance or ideas –
        Thankyou,

        • Mike says:

          Have the same problem…
          ist anybody outthere who solved it?

          Regards
          Mike

  5. Ashiq says:

    Great plugin! I’m seeing a bug where the default user-registration email has a generated password in it, even when you have the options enabled to allow users to enter their own password.

  6. Dave says:

    My programmer fixed a conflict with Theme My Login, which is a great compliment to this plug-in. Thanks for the plug-in!

    http://wordpress.org/support/topic/plugin-register-plus-redux-style-displaynone-plus-crash-in-firefox?replies=8#post-2163621

  7. Bill says:

    I have the latest version (1.12) of Autochimp and the latest version (3.7.3) of Register Plus Redux. It used to send the new registered user info to Mailchimp. Now asof 9.8 it does not and I haven’t changed anything. I now notice that the REgister Plus Redux plugin has been removed room the WP public plugin directory and the reference to it has been removed from the Autochimp description paragraph. What happened and how could my software just all of a sudden stop working without any upgrades or anything? Does Autochimp still support Register Plus Redux? Is there any other way to get custom signup fields in to Mailchimp from WP such as address? One would think it should be very basic. Thanks!

  8. Alessandro says:

    I’ve a problem when I register a new user from the wp-admin/user-new.php page.
    The user doesn’t receive the notification email with username and password (even if the “Send this password to the new user by email.” option is checked).
    While if the user registers from the form of Register Plus, the notification email is sent as expected.

    What I’m missing???

    Thanks in advance,
    Alessandro

    • Alessandro says:

      I think I’ve found the problem, probably at the “if” condition at line 2611 of “register-plus-redux.php”:


      if ( $created_by == "user" && empty($options["disable_user_message_registered"]) ||
      $created_by == "admin" && empty($options["disable_user_message_created"]) ) {
      if ( empty($options["verify_user_email"]) && empty($options["verify_user_admin"]) ) {
      $registerPlusRedux->sendUserMessage($user_id, $plaintext_pass);
      }
      }

      Being the check for “verify_user_email” and “verify_user_admin” after the check for $created_by == “admin”, even if one is adding the user from the “user-new.php” page the plugin expects the new user to go to the authorization queue to be approved, but it doesn’t so the notification is not sent.

      I’ll try to find a consistent solution by myself, I’ll post it here if I actually find one.

      Se you soon!

      • Alessandro says:

        As expected, exploding the code at line 2611 in two “if” statements seems to work for me:


        if ( $created_by == "user" && empty($options["disable_user_message_registered"]) ) {
        if ( empty($options["verify_user_email"]) && empty($options["verify_user_admin"]) ) {
        $registerPlusRedux->sendUserMessage($user_id, $plaintext_pass);
        }
        }
        if ( $created_by == "admin" && empty($options["disable_user_message_created"]) && isset($_POST['send_password']) ) {
        $registerPlusRedux->sendUserMessage($user_id, $plaintext_pass);
        }

        but I don’t know if this has side effects on the behaviour of the plugin.
        USE IT AT YOUR OWN RISK

        Radiok, can you investigate about a more consistent solution to the problem?

        Thank you very much :)

        P.S. I also added a check for the “Send this password to the new user by email.” option of the user-new.php page: isset($_POST['send_password']); it isn’t considered by the Register Plus Redux plugin, so the email is sent even if an admin leaves it unchecked!

        • Charlie says:

          Are you serious?

          Code Line 2611?!?!?!?!?!?!?!?!?!?!?

          HaHa … am I glad I don’t have to maintain that code.

          Besides I think the developer of this plugin took a hike. I have tried to contact him for months now and he doesn’t answer. I am in touch with the developer of AutoChimp and he can’t get a hold of the guy who developed Register Plus Redux either. So I guess we all just might have written our 2 cents on a roll of toilet paper and used it the next morning.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>