Just realized I was missing this field in the database table:
   Field('reset_password_key', length=128, default= '',
writable=False, readable=False),

On Aug 25, 3:10 pm, Francisco Costa <m...@franciscocosta.com> wrote:
> auth_table = db.define_table(
>     auth.settings.table_user_name,
>     Field('first_name', length=128, default=''),
>     Field('last_name', length=128, default=''),
>     Field('username', length=128, default=''),
>     Field('email', length=128, default='', unique=True),
>     Field('password', 'password', length=256, readable=False,
> label='Password', requires=CRYPT()),
>     Field('picture','upload'),
>     Field('thumb','upload',writable=False,readable=False),
>     Field('registration_key', length=128, default= '', writable=False,
> readable=False)
> )
> auth_table.username.requires = IS_NOT_IN_DB(db, auth_table.username)
> auth_table.first_name.requires = \
>   IS_NOT_EMPTY(error_message=auth.messages.is_empty)
> auth_table.last_name.requires = \
>   IS_NOT_EMPTY(error_message=auth.messages.is_empty)
> auth_table.password.requires = [CRYPT()]
> auth_table.email.requires = [
>   IS_EMAIL(error_message=auth.messages.invalid_email),
>   IS_NOT_IN_DB(db, auth_table.email)]
> auth.settings.table_user = auth_table
>
> and
>
> auth.define_tables(migrate=True)
>
> On Aug 25, 2:58 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > If you have auth.define_tables(migrate=False), try change it to true
> > If you use a custom auth_user table, please post it.
>
> > On Aug 25, 7:10 am, Francisco Costa <m...@franciscocosta.com> wrote:
>
> > > I have this function in the default controller
>
> > >     def retrieve_password():
> > >         return dict(form=auth.retrieve_password())
>
> > > and I have this view default/retrieve_password.html
>
> > >     {{response.title=T('Retrieve Password')}}
> > >     {{extend 'layout.html'}}
> > >     {{app=request.application}}
> > >     {{=form}}
>
> > > When I click submit this error happens: ProgrammingError: (1064, "You
> > > have an error in your SQL syntax; check the manual that corresponds to
> > > your MySQL server version for the right syntax to use near 'WHERE
> > > auth_user.id=1' at line 1")
>
> > > But the email is sent. When i click on the email link I get a flash
> > > message with 'Invalid reset password'
>
> > > Any help?

Reply via email to