# Create user automatically in Discourse when they sign up in Wordpress?

**URL:** <https://meta.discourse.org/t/create-user-automatically-in-discourse-when-they-sign-up-in-wordpress/58494>\
**Category:** WordPress\
**Created:** [Mars 6, 2017, 7:35 UTC](https://meta.discourse.org/t/create-user-automatically-in-discourse-when-they-sign-up-in-wordpress/58494 "2017-03-06T19:35:34Z")\
**Posts on this page:** 1\
**Showing post:** 23

<div class="post-metadata">

**Author:** ![lkramer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lkramer/32/83897_2.png) [@lkramer](https://meta.discourse.org/u/lkramer)\
**Post date:** [Décembre 14, 2017, 6:47 UTC](https://meta.discourse.org/t/create-user-automatically-in-discourse-when-they-sign-up-in-wordpress/58494/23 "2017-12-14T18:47:09Z")

</div>

The option to create a new user wasn’t working for me so I dug into the plugin code and figured out why. In case this is helpful to anyone else:

The **create\_discourse\_user** function runs as a result of WP’s **wp\_login**  **action** but for some reason, **wp\_login** doesn’t get fired in my setup of WP when someone creates an account.

It’s probably because we use the WP plugin MemberMouse to handle members and it hijacks the registration/login system in unexpected ways.

So I added in a new way of firing off **create\_discourse\_user** and it works now.

---

_[View the full topic](https://meta.discourse.org/t/create-user-automatically-in-discourse-when-they-sign-up-in-wordpress/58494)._
