Thanks HC.

The book holds a lot of information, not allways so easy to find. :=)


Kenneth

Even easier - as I only saw now (always worthwhile to reread the book
every so often)

""" (w2p book Ch 8)

To start using Auth, you need at least this code in a model file,
which is also provided with the web2py "welcome" application and
assumes a db connection object:

from gluon.tools import Auth
auth = Auth(globals(), db)
auth.define_tables(username=False)

Set username=True if you want auth to user username for login instead
of email.

"""

On Jan 30, 11:55 am, hcvst<hcv...@googlemail.com>  wrote:
Hi Kenneth,

remove the 'username' field from the auth_user table. Also see Chapter
8http://web2py.com/book/default/chapter/08on custom tables.

I think in the past w2p only used email by default. The new app wizard
appears to include it now.

Regards,
HC

On Jan 30, 11:13 am, Kenneth Lundström<kenneth.t.lundst...@gmail.com>
wrote:







Hello list,
I have an old application build two years ago and it uses email adress
as the username, so you don t need a different username.
Now I d like to do the same on a new application but I don t know what
to change to do this.
Any ideas?
Kenneth

Reply via email to