treehouse : what would you like to learn today?
Web Design Web Development iOS Development

WordPress - Do something immediately after new user registration..

  • hi,

    just wanted to know if i can manually call a php function that sends data to another service as soon as a new user is registered.

    the user can either be registered by wordpress registration form or by various social login.

    for e.g :-

    i want to call webusercreate() which is located in xxxx/webusercreate.utils.php

    Thanks in advance.

  • You could simply redirect the user after registration to a custom "Thank You" page and run the function there.

    There's a decent write up of registration redirect here

  • This wordpress plugin has "post-registration" redirect functionality that says "You can add your own code logic before and between any of the plugin's normal redirect checks if needed." http://wordpress.org/extend/plugins/peters-login-redirect/

    Your "code logic" could be your PHP call. I haven't installed and tested this though--I'm just going based off the description.