Title: Does it work wit user_register?
Last modified: April 1, 2020

---

# Does it work wit user_register?

 *  Resolved [patrickbln](https://wordpress.org/support/users/patrickbln/)
 * (@patrickbln)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/does-it-work-wit-user_register/)
 * Hi,
 * thanks for this small tool, i have a question before using it tho…
    I wrote a
   small function which add some stuff to the DB with the users ID when he registers:
 * add_action( ‘user_register’, ‘PHIT_createbbbroom’, 10, 1 );
    function PHIT_createbbbroom(
   $user_id ) { //do stuff here, insert $user_id to custom post type meta }
 * will this hook work with your plugin? I mean does it fire after the new user 
   id was created?
 * Kind regards
    Patrick

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [patrickbln](https://wordpress.org/support/users/patrickbln/)
 * (@patrickbln)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/does-it-work-wit-user_register/#post-12612384)
 * to clarify: i am aware that it will only work for newly registered users tho,
   thats ok 🙂
 *  Plugin Author [David Marín Carreño](https://wordpress.org/support/users/davefx/)
 * (@davefx)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/does-it-work-wit-user_register/#post-12743349)
 * Yes. The plugin calculates and sets the user ID before the new row is inserted
   into the users table, so any user_id received through the action user_register
   would already be randomized.
 *  Plugin Author [David Marín Carreño](https://wordpress.org/support/users/davefx/)
 * (@davefx)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/does-it-work-wit-user_register/#post-12743361)
 * Marking question as resolved

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Does it work wit user_register?’ is closed to new replies.

 * ![](https://ps.w.org/random-user-ids/assets/icon-256x256.png?rev=3556576)
 * [DFX Random User IDs](https://wordpress.org/plugins/random-user-ids/)
 * [Support Threads](https://wordpress.org/support/plugin/random-user-ids/)
 * [Active Topics](https://wordpress.org/support/plugin/random-user-ids/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/random-user-ids/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/random-user-ids/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [David Marín Carreño](https://wordpress.org/support/users/davefx/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/does-it-work-wit-user_register/#post-12743361)
 * Status: resolved