Skip to content

Commit

Permalink
ensured users are redirected to dashboard upon registration
Browse files Browse the repository at this point in the history
  • Loading branch information
FND committed Jan 18, 2014
1 parent 5f37ccf commit 7371e42
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tiddlywebplugins/bfw/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ['']


Expand Down

0 comments on commit 7371e42

Please sign in to comment.