I am going to need your help here. from tools.py

            user = self.db(table_user.email ==
form.vars.email).select().first()
            ....
            d = {passfield: user[passfield].validate(password)[0],
                 'registration_key': ''}

according to your error it says user[passfield] is a str. It cannot be
be. From the code above it is clearly a record. Can you add a print
statement as see what is going on?

Can you also print your code for custom auth?

Massimo


On Feb 8, 12:03 pm, Alexandre Andrade <alexandrema...@gmail.com>
wrote:
> Now, using the other example, get the error:
>
> Traceback (most recent call last):
>   File "gluon/restricted.py", line 173, in restricted
>     exec ccode in environment
>   File "/home/web2py/applications/convenios/controllers/default.py"
> <https://hipercenter.com/admin/default/edit/convenios/controllers/defa...>,
> line 354, in <module>
>   File "gluon/globals.py", line 96, in <lambda>
>     self._caller = lambda f: f()
>   File "/home/web2py/applications/convenios/controllers/default.py"
> <https://hipercenter.com/admin/default/edit/convenios/controllers/defa...>,
> line 321, in user
>     return dict(form=auth())
>   File "gluon/tools.py", line 729, in __call__
>     return self.retrieve_password()
>   File "gluon/tools.py", line 1621, in retrieve_password
>     return self.reset_password_deprecated(next,onvalidation,onaccept,log)
>   File "gluon/tools.py", line 1460, in reset_password_deprecated
>     d = {passfield: user[passfield].validate(password)[0],
> AttributeError: 'str' object has no attribute 'validate'
>
> 2010/2/8 mdipierro <mdipie...@cs.depaul.edu>
>
>
>
> > Please use the example in here:
> >http://www.web2py.com/examples/default/tools#authentication
>
> > you probably have a too short password length, should be 512.
>
> > On Feb 8, 8:16 am, Alexandre Andrade <alexandrema...@gmail.com> wrote:
> > > I customize auth using the reference of page 245 (229 ) of the book, but
> > > after the login's of existents users  don't work.
>
> > > I tried with a new app, created a user, and works. Its not possible alter
> > it
> > > after.
>
> > > How make it work with a existent auth_user table?
>
> > > --
> > > Atenciosamente
>
> > > --
> > > =========================
> > > Alexandre Andrade
> > > Hipercenter.com
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > web2py+unsubscr...@googlegroups.com<web2py%2bunsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/web2py?hl=en.
>
> --
> Atenciosamente
>
> --
> =========================
> Alexandre Andrade
> Hipercenter.com

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to