I think a new class could do the job. You could modify your db.py
Replace

auth = Auth(db, hmac_key=Auth.get_or_create_key())

by

class MyAuth(Auth):
    # your code
    pass
auth = MyAuth(db, hmac_key=Auth.get_or_create_key())

​Regards, Martin
​

2014-02-23 0:21 GMT+01:00 Damien <[email protected]>:

>
> I would like to associate to my users multiple E-mail addresses and phone
> numbers. I would like these users to be able to authenticate with any
> (verified) E-mail address or phone number. I am wondering what would be the
> best approach to achieve this.
>
> One idea would be to modify the existing Auth class. I am willing to do
> it, but I would like to know if this is something that could then
> potentially be merged in the main branch of web2py (any one else interested
> in this feature?). If not, this approach might not work as I don't want to
> maintain an alternate version of Auth that would diverge from the one
> integrated in web2py.
>
> Thank you for your suggestions.
>
> Damien
>
>  --
> 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 [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to