Not allowed email message is not shown


(Hosein Naseri) #1

I have white listed some email domains for my forum. Previously the user.email.not_allowed message would be shown to users when they input an email outside the white list. And I have customized this message for my own purpose. However currently a message as simple and vague as “invalid” is shown to these kind of users. It is confusing them and they don’t understand what is actually invalid in their inputs.

Please fix this issue.


(Jay Pfaffman) #2

You’ll need to provide a bit more information about what is wrong in order for that to be fixed. It sounds like a different error condition.


(Hosein Naseri) #3

This is the parameter I input for the registration:

name	"wgwgweg"
email	"asjjakshk@sample.com"
password	"okpwojnbagqyror"
username	"sdfdsfewewgweg"

This is the response I get:

success	false
message	"Primary email invalid"
errors	Object
    primary_email	[1]
               0	"invalid"
values	Object
    name	"wgwgweg"
    username	"sdfdsfewewgweg"
    email	null
is_developer	false

(Hosein Naseri) #4

I think previously I would get the user.email.not_allowed from the above place. However now it only says “invalid”.

this is also not identical to what I have customized for the user.email.not_allowed messaage


(Jeff Atwood) #5

Hmm can you check this when you are back @neil?


(Jay Pfaffman) #6

Well, I’m getting the same error on a site I just set up. It turns out that the email address already had an account.

Check these response headers (I changed name * username, but email is null):

{  
   "success":false,
   "message":"Primary email is invalid",
   "errors":{  
      "primary_email":[  
         "is invalid"
      ]
   },
   "values":{  
      "name":"xxxxxxx ",
      "username":"xxxxxxxx",
      "email":null
   },
   "is_developer":true
}

(Hosein Naseri) #7

Yes exactly I get the same thing for ppl who already signed up. Sometimes ppl come back after a while and they dont know if they have an account or not. When they provide their email, The only message they get is “Primary email is invalid” that is not explanatory as to what is the actual problem. Can we have a fix soon @neil ?


(Stéphane P.) #8

Hello,

We have the same problem here, but it’s worse if you are using localized versions. The message is only half translated so it’s “Primary email est invalide” in French.

It is confusing when the error is that the user already have an account with the same email (which is the most common mistake users write us about).

A fix if it’s a bug or any method to change it if it’s not would be really useful. Beside that minor annoyance, discourse is really the most user-friendly forum you can have !

Best regards,


(Neil Lalonde) #9

This is a problem caused by the email column of the users table being a dud. It’s always nil. Emails have been moved to the user_emails table, and the error message is wrong now. I’m looking into it.


(Neil Lalonde) #10

I made a fix for this today. Your customized message should be shown again after you deploy the fix.


(Jeff Atwood) #11