it's more a logical problem than your framework.

I just want to know how to log a user.

Bussiere

Le lundi 26 mars 2012 01:35:04 UTC+2, Massimo Di Pierro a écrit :
>
> I have been on the road and hard to keep up up with posts. If this issue 
> is still open please open a ticket so it can be tracked.
>
> On Sunday, 25 March 2012 11:57:20 UTC-5, bussiere adrien wrote:
>>
>> I want to create myself a user then log him.
>> This for an open source project : 
>> https://github.com/bussiere/​​jackpoint<https://github.com/bussiere/jackpoint>
>>   
>> I've been on it for 3 days now.
>>
>> I want to create a user then loggin him and auth him.
>> If you find it just give me your paypal in private buy you a drink.
>>
>> Here is my code :
>> def test():
>>
>>       password="toto"
>>         my_crypt = CRYPT(key=auth.settings.hmac_​​key)
>>         crypt_pass = my_crypt(password)[0]    
>>         user = db.auth_user.insert(
>>            Surnom="Surnom",
>>            email="email5@toto"​​,
>>            username="titi",
>>            password=crypt_pass​​,
>>                            )
>>         db.commit()
>>         
>>         user = auth.login_bare("titi",passwor​​d)
>>         session.auth = 
>> Storage(user=user,expiration=a​​uth.settings.expiration,hmac_​​key=str(uuid4()))
>>         redirect(URL('​​inscriptioninvit'))
>>
>> @auth.requires_login()
>> def inscriptioninvit():
>>      return "hello"
>>
>>

Reply via email to