hi,
i want to use condition that if user not log in will redirect to login
page, and if logged in will redirect to index page, heres my
controller :
if not session.authorized:
redirect(URL('user'))
else:
redirect(URL('index'))
def index():
return dict(message=T('Hello World'))
def user():
return dict(form = auth())
i know there is a mistook code on my own, could there anybody show me
where is the wrong part?
i've tried the other code too, but got the same result :
if not auth.is_logged_in():
redirect(URL('user'))
else:
redirect(URL('index'))
def index():
return dict(message=T('Hello World'))
def user():
return dict(form = auth())
thank you so much before