Support » Plugins » Hacks » Where to add codes when a new user register

  • hi, I’m new to wordpress. I’m trying to find the exact place where wordpress execute the code when the user register to your site. I wanted to add some code where it will also sent some data to another database. is this possible? thank you whoever will respond to my question.

    Kind Regards,
    Ian

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    There’s not really an exact place, a lot of code happens in different places. Doesn’t really matter, all you need is a good hook to latch onto to get your code executed. You might try the action ‘user_register’. From there, what you do is only limited by php, so yes, you can put data into another database. Your hook code is only passed the user ID, so you’ll have to figure out how your code accesses the info you’ll be adding to the database. Maybe a global array? Or from a php superglobal populated by a form submit?

Viewing 1 replies (of 1 total)
  • The topic ‘Where to add codes when a new user register’ is closed to new replies.