(I have tried the `auth.settings.login_userfield = 'olduserid'` option; but all it did was change the input label, the validator (for email) remained)
On Tue, May 28, 2013 at 11:24 AM, Alec Taylor <alec.tayl...@gmail.com> wrote: > I have actually migrated some data, and have a second userid type > field; and the email field isn't unique. > > How do I enable login with that second userid field (of type "integer")? > > On Tue, May 28, 2013 at 5:48 AM, Niphlod <niph...@gmail.com> wrote: >> if you do >> auth.define_tables(username=True) >> >> a username field is added. >> >> BTW: by "id" we all understood you want to login using the username in the >> registration rather than the email. >> >> If instead you meant "by the serial id associated with the auth_user row" >> then forget about username.... >> >> >> >> >> On Monday, May 27, 2013 8:38:30 PM UTC+2, Alec Taylor wrote: >>> >>> Hmm, that does slightly confuse me. >>> >>> Am I supposed to add in a 'username' field? >>> >>> This is how the `auth_user` table looks by default, and after >>> registering I tried the value in each column for username; but nothing >>> logged me in: >>> >>> CREATE TABLE auth_user( >>> id INTEGER PRIMARY KEY AUTOINCREMENT, >>> first_name CHAR(128), >>> last_name CHAR(128), >>> email CHAR(512), >>> password CHAR(512), >>> registration_key CHAR(512), >>> reset_password_key CHAR(512), >>> registration_id CHAR(512) >>> ); >>> >>> On Mon, May 27, 2013 at 3:13 PM, Massimo Di Pierro >>> <massimo....@gmail.com> wrote: >>> > auth.define_tables(username=True) >>> > >>> > >>> > >>> > On Sunday, 26 May 2013 22:41:09 UTC-5, marco mansilla wrote: >>> >> >>> >> El Mon, 27 May 2013 13:00:11 +1000 >>> >> Alec Taylor <alec.t...@gmail.com> escribió: >>> >> >>> >> > Is it possible to login to web2py by ID rather than by email? >>> >> > >>> >> > Thanks for all information, >>> >> > >>> >> > Alec Taylor >>> >> > >>> >> >>> >> if you mean something like username yes... and there are some ways to >>> >> hardcode the behaviour for this field to take the id value... >>> >> >>> >> when you define a username field, automatically auth asks for it >>> >> instead of email. >>> >> >>> >> Marco. >>> > >>> > -- >>> > >>> > --- >>> > 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+un...@googlegroups.com. >>> > For more options, visit https://groups.google.com/groups/opt_out. >>> > >>> > >> >> -- >> >> --- >> 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/groups/opt_out. >> >> -- --- 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/groups/opt_out.