Gebruikerscreatie API: 'active' attribuut ingesteld op True maar retourneert False in antwoord

Hi @MihirR

Thank you so much for your reply and for helping me out with this! I really appreciate it.

I think I’ve found the problem. The issue was with the email addresses I was using — specifically, emails with a plus sign (like Gmail aliases whatever+something@gmail.com, whatever+something2@gmail.com) for dummy users. When I use an email without the plus sign, everything works fine, and the user gets created like is the case with your CSV sample. However, when using an email with a plus sign, the API doesn’t seem to handle it correctly.

In the screenshot you can see 2 curl calls: with a plus sign and without a plus sign in the email…

The weird thing is that when I use the plus sign, I don’t get an error. I actually receive a success response that says the account has been created and activated, but this isn’t true. I checked directly in the Rails console and connected to the database, and the user is not there. The user doesn’t show up in the discourse admin either.

It seems like there’s an issue with the API’s response — it reports a successful creation and activation (Sorry, the string in the screenshot is in Croatian), but the user is never actually created in the system. This suggests there might be a problem with how the API handles or reports on user creation when special characters (like the plus sign) are used in the email.

Again, thanks for your help, and I thought I’d share this discovery with you in case it helps!

1 like