it work great..
but i have another question:
how i can customize auth_user?
i need to add on field:
Field('id_utente', db.Anagrafica.id)
On 14 Set, 15:16, mdipierro <[email protected]> wrote:
> I see. It should be
>
> nome=utente[0].Nome
> cognome=utente[0].Cognome
> email=utente[0].Email
> password=db.auth_user.password.validate(raw_password)[0]
>
> db.auth_user.insert(first_name=nome,last_name=cognome,password=password,email=email)
>
> Mind that a password may not validate. In that case
> db.auth_user.validate(raw_password)[1] evaluates to true and contains
> the error message.
>
> On Sep 14, 7:59 am, ceriox <[email protected]> wrote:
>
> > i do this:
>
> > nome=utente[0].Nome
> > cognome=utente[0].Cognome
> > email=utente[0].Email
> > password=base64.b64encode(sha.sha(str(random.random())).hexdigest())[:
> > 8]
>
> > db.auth_user.insert(first_name=nome,last_name=cognome,password=password,email=email)
>
> > but when i try to log in with the password it don't work
>
> > On 14 Set, 14:39, ceriox <[email protected]> wrote:
>
> > > i wanna insert a new user in db.auth_user with something like:
> > > db.auth_user.insert(first_name=nome)
>
> > > (i don't know how to specify more field)
>
> > > On 14 Set, 13:34, mdipierro <[email protected]> wrote:
>
> > > > Not sure I understand.
>
> > > > On Sep 14, 3:08 am, ceriox <[email protected]> wrote:
>
> > > > > how i can directly insert a record to user auth table without generate
> > > > > a user table?
>
> > > > > thanks for help
>
>