self.login_bare(....) calls self.login_user(...) and it automatically logs 
in the user and stores user in session.auth.user


On Sunday, 17 February 2013 23:34:01 UTC-6, yashar wrote:
>
> is there any way that i log in user by code?
> for example after checking username and password with login_bare, i push 
> the user into the session as logged-in user? in this case there is no need 
> to write ajax/login directly, and the programmer has a better control.as 
> you can see in my code i check user two times one in bare_login and one in 
> auth.login, because i can not return 'login failed' value from code if i 
> use just form=auth.login().
>
> when the formkey is changing? during form creation or after each submit? 
> because i create two auth.login() forms one in the index for view and one 
> in login function, and this is working so the formkey must be same, but 
> could you help me to write a cleaner code? in that code after success login 
> page automaticly redirected as i dont understand why?
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to