I'd say it is a big that is stores username in the email field.
It should use a 'username' field.
I will look into this but for now my suggestion is edit tools and
change
if 'username' in table_user.fields:
username = 'username'
tmpvalidator = IS_NOT_EMPTY(self.messages.is_empty)
else:
username = 'email'
tmpvalidator = IS_EMAIL(self.messages.invalid_email)
into this
username = 'email'
tmpvalidator = IS_EMAIL(self.messages.invalid_email)
Sorry for this problem.
On Dec 15, 11:20 am, Fred <[email protected]> wrote:
> The Auth.login() method in tools.py is causing my grief. It's setting
> a temporary IS_EMAIL() validator on the auth_user.email field during
> login.
>
> I've been using the standard Auth tables along with LDAP
> authentication successfully, in production, for months. That scheme
> stores the LDAP username in the auth_user.email field. But now it
> seems that newer Auth code wants there to be a 'username' field in the
> auth_user table to avoid the IS_EMAIL() check during login.
>
> This is a pain. It's not backward compatible for one. I see in the
> v2 manual the explanation of how to define auth_user from scratch and
> add a 'username' field that way. I've got several apps in production
> and don't want to update all their models with that mess. I'm
> experimenting with patching tools.py to conditionally define a
> auth_user.username field based on a new Auth.settings.username_field
> parameter which I can set in the models. That's going OK except that
> I'm seeing new rows added to auth_user as I login with usernames that
> I've already logged in with before.
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.