# Discourse User Created Response Not as expected

**URL:** https://meta.discourse.org/t/discourse-user-created-response-not-as-expected/124599
**Category:** Development
**Created:** [8월 1, 2019, 10:58오전 UTC](https://meta.discourse.org/t/discourse-user-created-response-not-as-expected/124599 "2019-08-01T10:58:48Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Vishal\_Kaushik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vishal_kaushik/32/140452_2.png) [@Vishal\_Kaushik](https://meta.discourse.org/u/Vishal_Kaushik)
#### Post date: [8월 1, 2019, 10:58오전 UTC](https://meta.discourse.org/t/discourse-user-created-response-not-as-expected/124599/1 "2019-08-01T10:58:48Z")

</div>

Discourse returning

> You’re almost done! We sent an activation mail to **abc@gmail.com**. Please follow the instructions in the mail to activate your account.
> 
> If it doesn’t arrive, check your spam folder.

as message even when the email id exists. I have done changes in the code, I hardcoded the activation message in create method in userController as “User Activated”. Even then the message comes as above. Can anyone help?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [8월 1, 2019, 2:29오후 UTC](https://meta.discourse.org/t/discourse-user-created-response-not-as-expected/124599/2 "2019-08-01T14:29:12Z")

</div>

Sorry, I don’t understand what you have written?

---

<div class="post-metadata">

### Author: ![Vishal\_Kaushik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vishal_kaushik/32/140452_2.png) [@Vishal\_Kaushik](https://meta.discourse.org/u/Vishal_Kaushik)
#### Post date: [8월 1, 2019, 2:38오후 UTC](https://meta.discourse.org/t/discourse-user-created-response-not-as-expected/124599/3 "2019-08-01T14:38:14Z")

</div>

I will tell you in detail.

So our requirements are : We have to register bulk users from our DB to discourse. So, we can’t allow users to activate their discourse account via email as we do that via firebase on our webapp.

So, I did some research on discourse code and I commented out the part in userController : activate function which sends email and activated the user there itself so that it was returning the following response :

> ```
> success: true,
> active: true,
> message: "User activated",
> user_id: user.id
> 
> ```

But from yesterday, I started getting this response below :

> success: true,  
> active: false,  
> message: ‘You’re almost done! We sent an activation mail to **[abc@gmail.com](mailto:abc@gmail.com)**. Please follow the instructions in the mail to activate your account.If it doesn’t arrive, check your spam folder’

How can I check my user register API is hitting the create function or is there some type of caching which is causing me this trouble.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [8월 1, 2019, 4:49오후 UTC](https://meta.discourse.org/t/discourse-user-created-response-not-as-expected/124599/4 "2019-08-01T16:49:36Z")

</div>

> [@Vishal\_Kaushik](#):
>
> I commented out the part in userController : activate function

> [@Vishal\_Kaushik](#):
>
> But from yesterday, I started getting this response below :

Unless you are making the changes in a plugin, updating Discourse will overwrite any changes you make to the Discourse code. Could this be what has happened?

---

<div class="post-metadata">

### Author: ![Vishal\_Kaushik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vishal_kaushik/32/140452_2.png) [@Vishal\_Kaushik](https://meta.discourse.org/u/Vishal_Kaushik)
#### Post date: [8월 2, 2019, 4:35오전 UTC](https://meta.discourse.org/t/discourse-user-created-response-not-as-expected/124599/5 "2019-08-02T04:35:23Z")

</div>

Which plugin you are talking about? The only changes I made was in users\_controller in discourse code? Can you just help me with the code. I want to debug is using the code. Just let me know where the routes are for user sign up. `"/u"` or `"/u.json"` to be precise.

Also, If I log something on userController using print, will I be able to see the log on terminal, right now I am unable to.

---

<div class="post-metadata">

### Author: ![Vishal\_Kaushik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vishal_kaushik/32/140452_2.png) [@Vishal\_Kaushik](https://meta.discourse.org/u/Vishal_Kaushik)
#### Post date: [8월 2, 2019, 6:42오전 UTC](https://meta.discourse.org/t/discourse-user-created-response-not-as-expected/124599/6 "2019-08-02T06:42:27Z")

</div>

I got the issue. I wasn’t sending the correct `password_confirmation` and `challenge` from my payload and it was declaring it as suspicious request. I have made the required changes and its working now. But what is the logic behind these two params as they keep on changing.
