The auth.login() action automatically verifies the login and logs the user 
in (which involves adding the user record to the user's session) -- you 
don't have to do any of that explicitly. If you want to redirect to a 
specific URL after login, you can set auth.settings.login_next to the 
desired URL. Another option is to use auth.settings.login_onaccept, which 
is a function that takes the login form object (after it has been 
processed).

Anthony

On Tuesday, June 4, 2013 1:13:47 PM UTC-4, lesssugar wrote:
>
> In my layoyt.html I have the following code
>
> {{=auth.login().update(_action=URL('default', 'login'), _name=
> 'global_login')}}
>
> The login form takes user email and password. It generates correctly. 
> Let's assume there are test users in db.auth_user.
>
> I would be grateful if someone provided a short example of further login 
> implementation:
> 1. validate the login data (is email in db? is password correct?)
> 2. if data OK: redirect to a specific user profile
>

-- 

--- 
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