Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

how can I tell WordPress, that if a user registers, it shall execute my function?

share|improve this question

1 Answer 1

up vote 8 down vote accepted

You can use user_register action hook which fires after a user has registered and passes $user_id as a variable:


function my_function($user_id){
  //do your stuff
share|improve this answer
is there any hook just before inserting into database? –  Atif Mohammed Ameenuddin Nov 2 '12 at 21:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.