~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/dispatch/login.py

  • Committer: mattgiuca
  • Date: 2008-01-10 04:55:13 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:161
dispatch.login: Correctly stores the username string (not argument field)
    in the session. (This wasn't detected before because of the following
    issue).
debuginfo: Previously got the "value" from session variables (which worked
    because the only variable was being stored as a Field). Now just returns
    the variable as a string, as it is now stored correctly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
            if (password is not None and
64
64
                authenticate.authenticate(username.value, password.value)):
65
65
                # Success - Set the session and redirect to avoid POSTDATA
66
 
                session['login_name'] = username
 
66
                session['login_name'] = username.value
67
67
                session.save()
68
68
                req.throw_redirect(req.uri)
69
69
            else:
103
103
    # No security is required here. You must have already been authenticated
104
104
    # in order to get a 'login_name' variable in the session.
105
105
    try:
106
 
        return session['login_name'].value
 
106
        return session['login_name']
107
107
    except KeyError:
108
108
        return None