From 7371e424df1ecb42119275ad5edebdde5bb9bbef Mon Sep 17 00:00:00 2001 From: FND Date: Sat, 18 Jan 2014 11:26:11 +0100 Subject: [PATCH] ensured users are redirected to dashboard upon registration --- tiddlywebplugins/bfw/web.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tiddlywebplugins/bfw/web.py b/tiddlywebplugins/bfw/web.py index 3791c73..81937d5 100644 --- a/tiddlywebplugins/bfw/web.py +++ b/tiddlywebplugins/bfw/web.py @@ -200,14 +200,13 @@ def register_user(environ, start_response): index.text = "Welcome to %s's personal wiki." % username store.put(index) - root_uri = uri('front page', environ) - - cookie = make_cookie('tiddlyweb_user', user.usersign, path=root_uri, + cookie = make_cookie('tiddlyweb_user', user.usersign, + path=uri('front page', environ), mac_key=environ['tiddlyweb.config']['secret'], expires=environ['tiddlyweb.config'].get('cookie_age', None)) - start_response('303 See Other', - [('Set-Cookie', cookie), ('Location', root_uri.encode('UTF-8'))]) + start_response('303 See Other', [('Set-Cookie', cookie), + ('Location', uri('dashboard', environ).encode('UTF-8'))]) return ['']