Commit 9116ba17 authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Ok now I actually fixed registration reqmnt.

parent 9b611b46
......@@ -53,9 +53,9 @@ def application(environ, start_response):
# unregister the user, in case they're already in
#library.deactivate_user( hash_value )
if( library.user_registered( usr ) ):
# register the hashed user with the SQL database
registered = library.activate_user( hash_value, usr )
if( registered ):
library.activate_user( hash_value, usr )
# push the cookie to the user and redirect
status = '303 See Other'
response_headers = [('Set-Cookie', cookie_value),
......@@ -63,7 +63,7 @@ def application(environ, start_response):
('Content-type', 'text/plain')]
start_response(status, response_headers)
return [ str(cookie) ]
else: body = ["<p>Error: you are not registered to use this service.</p>"]
else: body = ["<p>Error: You are not registered to use this service.</p>"]
else:
body = ["<p>Error: invalid username or password.</p>"]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment