WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I register a new user to my blog, I always receive an email. The code in simple terms should look like this.


        //send email to admin
        //I want to do something else.


I would like to do more than receiving an email. Can someone point me to the right code.

I have tried using the wp_insert_user() function in wordpress but that creates the user inside the editor.

thanks a lot.

share|improve this question
What more would you like to do? – s_ha_dum Dec 11 '12 at 19:13
create a directory with the new user's username where I can store his/her images on a plugin that I am working on – Ronny Dec 11 '12 at 19:16
up vote 2 down vote accepted

You want to use the user_register hook, probably. Then use the Filesystem API to make the folder. Be aware that filesystem manipulation is dependent upon server configuration and may not always work, but using the API should ameliorate that problem as much as possible.

share|improve this answer
I think a simple code example could help. – toscho Dec 11 '12 at 19:37

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.