Hi Niphlod, I didn't want to use web2py features and thus auth as an object wouldn't be available to me.
I finally did this, I changed wsgihandler.py so that : If url is base_url or base_url+"/", I check the cookies. If cookies say, the user is logged in then I redirect him to my required controller using a 301 redirect, else I display the html contents. This way, I can significantly improve speed for my login page as I would now just cache the contents using memcache. - abhishek On Saturday, 9 February 2013 00:55:00 UTC+5:30, Niphlod wrote: > > if auth.user_id . > > On Friday, February 8, 2013 6:52:13 PM UTC+1, Abhishek Gupta wrote: >> >> Hi, >> >> I have a website running on web2py. I want to optimize the login page, >> and strip all the web2py functional but to see if the user is logged in or >> not. To explain more, I want to do following: >> >> if user.is_logged_in_custom(): >> return my_html >> >> else: >> redirect to_some_other_page >> >> The idea is that I don't want to interact with databases, models, and any >> other modules etc and get the login page as fast as possible. I can't >> simply cache it, as in that case if user is logged in then also the login >> page is displayed. >> >> Thanks in advance >> Abhishek >> > -- --- 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.

