Ready to get started?Download WordPress


[resolved] Action hook when creating a new user through admin? (2 posts)

  1. Rutwick Gangurde
    Posted 3 years ago #


    Need to know this ASAP!
    I've been working on a plugin recently, and we are creating a users profile as a custom post. The flow starts with the admin creating a new user through the 'Users > Add new' section and the u/p being sent to the user for completion of the rest of the info. I just want to know which action hook is called when a new user is added through the backend? I need to use it to create the post right when the user is added...

    Thanks for any help in advance!


  2. Rutwick Gangurde
    Posted 3 years ago #


    Found it myself...
    If someone stumbles on the same question, here's the answer...

    do_action('user_register', $user_id);
    add_action ('user_register', "test");
    function test()
    	//Do Something

    Hope someone finds it helpful...

    Thanks a lot for all the help :P

Topic Closed

This topic has been closed to new replies.

About this Topic