Hi Hamdy,
Slight modification of your code.
>auth.settings.login_url = URL(r=request, f='user', args='login')
> if not auth.is_loggedin():
> redirect auth.settings.login_url
An error was thrown, "Auth object does not......."
The modification.
if not auth.is_logged_in():
redirect (auth.settings.login_url)
It was what i needed. Thanks a lot.
Cheers,
ed
On Dec 9, 4:26 pm, "hamdy.a.farag" <[email protected]> wrote:
> --Quote from web2py manual -----
>
> auth.settings.login_next = URL(r=request, f='index')
>
> By default, the login page, after successful login, redirects the
> visitor to the
> referrer page (if and only if the referrer required login). If there
> is no referrer,
> it redirects the visitor to the page pointed to by this variable.
>
> ----
>
> auth.settings.login_url = URL(r=request, f='user', args='login')
> ----> Tells web2py the URL of the login page
>
> ---
>
> and if you mean that you need a means to redirect user to login page
> if he's not logged in , you can use
>
> if not auth.is_loggedin():
> redirect auth.settings.login_url
--
You received this message because you are subscribed to the Google Groups
"web2py-users" 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.