[web2py] Re: auth_user automatically lowercase all email fields

2019-04-08 Thread Anthony
On Monday, April 8, 2019 at 10:11:33 AM UTC-4, lucas wrote:
>
> students log into this site i've had.  and they type all kinds of crazy 
> stuff.  i don't want to preserve what the students type because students 
> are inconsistent when they login.  so i want to force it to lowercase so at 
> least i know what is definitely stored in the db.
>

Yes, by default Auth already forces email addresses to lowercase. You have 
to set auth.settings.email_case_sensitive = True to *not *get that behavior.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: auth_user automatically lowercase all email fields

2019-04-08 Thread Leonel Câmara

>
> because students are inconsistent
>

Ahahaha if it was only students our lives would be much easier.  
  
On a more serious note, although most email systems are case insensitive 
nowadays it is allowed by the RFC to be case sensitive so it can be a 
different email. In the real world, I had to lowercase as well because I 
had support calls every day of people that could not login.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: auth_user automatically lowercase all email fields

2019-04-08 Thread lucas
students log into this site i've had.  and they type all kinds of crazy 
stuff.  i don't want to preserve what the students type because students 
are inconsistent when they login.  so i want to force it to lowercase so at 
least i know what is definitely stored in the db.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: auth_user automatically lowercase all email fields

2019-04-08 Thread Anthony
That's already the default behavior. If you wanted to preserve the case 
entered by the user, you would do:

auth.settings.email_case_sensitive = True

Anthony

On Monday, April 8, 2019 at 9:40:52 AM UTC-4, lucas wrote:
>
> hello one and all,
>
> i'm using web2py 2.17>.
>
> what is the best method to impose and automatically update the email field 
> to all lowercase characters without making the user have to retype the 
> email???  i want web2py to lowercase no matter its a new registration 
> (insert) or profile (update).
>
> thank you in advance.  lucas
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.