WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Rutwick Gangurde
    Member
    Posted 3 years ago #

    Hi...

    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!

    Rutwick

  2. Rutwick Gangurde
    Member
    Posted 3 years ago #

    Bump!

    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
    Rutwick

Topic Closed

This topic has been closed to new replies.

About this Topic