It still redirect me to the the auth page with the login form ....
Bussiere
Le dimanche 25 mars 2012 19:37:44 UTC+2, Vasile Ermicioi a écrit :
>
> that works for me
>
> def test():
> password="toto"
> my_crypt = CRYPT(key=auth.settings.hmac_key)
> crypt_pass = my_crypt(password)[0]
> if db(db.auth_user.email == 'email5@toto').count() == 0:
> db.auth_user.insert(
> Surnom="Surnom",
> email="email5@toto",
> username="titi",
> password=crypt_pass,
> )
> db.commit()
> user = auth.login_bare("titi",password)
> redirect(URL(request.controller, 'inscriptioninvit'))
> return dict()
>
> @auth.requires_login()
> def inscriptioninvit():
> return "hello"
>