On Feb 15, 2011, at 9:39 AM, Alexandre Andrade wrote: > Can I make a proposal to improve it? to me, a email have always to be lower > case, specially when it is used to login. > > > The problem is that email in auth_user need to be a unique key, and it allows > to be duplicated.
The relevant RFC (2821): > The local-part of a mailbox MUST BE treated as case sensitive. Therefore, > SMTP implementations MUST take care to preserve the case of mailbox > local-parts. Mailbox domains are not case sensitive. In particular, for some > hosts the user "smith" is different from the user "Smith". However, > exploiting the case sensitivity of mailbox local-parts impedes > interoperability and is discouraged. Mail servers can (and most do) treat the local part (before the '@') as case-insenstive, but they're not required to. Also, changing IS_EMAIL now would break applications that already have mixed-case addresses in their databases. I agree that it's an awkward situation. Ideally (for some sense of 'ideally'), we'd preserve the case that a user entered, but do case-insensitive compares. I'm not sure how practical that is, though. However, any given application is free to use IS_LOWER and force lower case. > > > > 2011/2/15 Jonathan Lundell <[email protected]> > On Feb 15, 2011, at 9:06 AM, Alexandre Andrade wrote: >> I think IS_EMAIL() validator has a bug: >> >> it accepts the same email with different lower and upper cases to be accepted >> >> [email protected] and [email protected] and [email protected] or any combination. >> >> The problem is quite simple, just transform it to lower before compare and >> insert in db. >> > > IS_EMAIL is just checking for validity. You can use IS_LOWER to convert to > lower case if you want to. > > > > -- > Atenciosamente > > > Alexandre Andrade > Hipercenter.com Classificados Gratuitos

