Here is how you manually create a user and the associated

user = auth.get_or_create_user(dict(email='...',password='...'))

the password must be encrypted. How the password is encrypted depends
on the algorithms you choose in

auth.settings.table_user.password.requires

IF

auth.settings.table_user.password.requires=CRYPT()

Then

cyperpassword=CRYPT()(plainpassword)[0]

Massimo

On May 20, 7:06 pm, Horst Herb <[email protected]>
wrote:
> I want to create my own login forms and need to create users programmatically.
> I expected some function such as login(username, cleartextpassword) in
> the auth class, and also something like cryptpwd(cleartextpassword)
> Auth however seems to break the MVC paradigm completely.
>
> Questions:
> 1) what do I have to do to programmatically "log in" somebody via auth
> (retaining all the auth goodies)
> 2) how is the password encrypted / hashed?
>
> Horst
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to