WordPress.org

Ready to get started?Download WordPress

Forums

Register Plus Redux
[resolved] Hook for after confirming account (7 posts)

  1. Matt Pramschufer
    Member
    Posted 1 year ago #

    I am trying to integrate with a third party email service provider similar to mailchimp. I want to know if there is a hook in your plugin in which I can tie into which would allow me to post data to ESP after the user has clicked the confirmation link in their email.

    If there is not, would you be able to tell me which file/function actually handles that and I will hack my code directly into your plugin to handle that.

    This would be a great feature for future versions, I have seen many systems simply call this Remote Ping. In which all it does it a cURL post to the url you specify with the post fields you specify. This is exactly what I need.

    Thanks in advance to whomever may be able to help me out!

    http://wordpress.org/extend/plugins/register-plus-redux/

  2. radiok
    Member
    Plugin Author

    Posted 1 year ago #

    There isn't a hook in place now, but I could easily add one. I'm thinking a user_registration_complete hook. If there is no email or admin verification it would call after registration is completed (all user data committed, and user/admin messages set out [if applicable]). If there is some verification in place, then the hook would run after whatever verification in place is completed and data is committed and messages sent out. Does that sound like a good start?

    I can look into the remote ping, but that's not quite as easy as dropping in a do_action.

  3. Matt Pramschufer
    Member
    Posted 1 year ago #

    That would be perfect. Just let me know if you need anything from me.

  4. radiok
    Member
    Plugin Author

    Posted 1 year ago #

    The action name is going to be, 'rpr_signup_complete', I chose signup over registration because... well, on a whim. Either way, I did change it slightly from what I said earlier, it happens after user data is committed, but before emails are sent out. Why? Eh, it was just easier. Let me know if that becomes a problem and I'll review. Regardless, this lands in 3.9.4 which may be published in the next few hours.

  5. Matt Pramschufer
    Member
    Posted 1 year ago #

    Awesome! Thank you so much, I will test it out and report back to you.

  6. Matt Pramschufer
    Member
    Posted 1 year ago #

    Radiok,
    Worked out great. I did have to edit your code just slightly. I went in and changed the do_action on line 437 and 516 to the following

    do_action( 'rpr_signup_complete', $user_id );

    So that way in my plugin I could grab the ID and pass the email to a third party ESP.

    Since you are such a responsive developer I had another question! How hard would it be to make a shortcode to embed the registration form in a page on the site. That way the login and registration form would be able to follow the same theme design?

    Thanks again for all of your work!

  7. radiok
    Member
    Plugin Author

    Posted 1 year ago #

    It's funny you mention changing to hook, I was just thinking that today that hook should probably pass something to reference. I will roll your change into the next release. As for the shortcode, that is on my list of to-do's. There's a bigger project I have to further customize the registration with templates. That would enable you to drop a student_registration template on one page and a teacher_registration template on another, for example. So that's a little more convoluted and involves me defining a custom post type. Which rolls into another bigger objective to wrap all user data fields into... something. I'm guessing another type of custom post. I'm doing that to customize both the order which existing fields, "First Name", "Last Name" etc can appear on the form and also you could potentially wrap fields added by other plugins. So all in all it's one ambitious project tied to another. I haven't figured out how I want to break them up or what order I want to do them in so it's all a little hectic right now.

    Sorry for the long winded response!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic