Just figured out that user was None, it wasn't authenticated, I had the code
in the login controller, that doesn't work while in that controller, I
followed Patrick's advice:
http://docs.turbogears.org/1.0/IdentityRecipies#pagecomment1
And put the code in the verify_login controller and it now works. Still
very confused on how this stuff all happens behind the scenes, wish there
was a diagram on it :)
Maybe you can help me with my next problem with sessions.
I've created a session when the user logs in:
//CODE//
id = identity.current.user.user_name
session[id] = session.get(id, acs_user(id, \
identity.current.user.display_name,
identity.current.user.email_address))
//CODE//
Now I am trying to access this session object when the user logs out in the
logout controller:
//CODE//
log.debug(session[id].usr)
//CODE//
What am I doing wrong here?
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Jorge Godoy
Sent: Friday, January 05, 2007 9:46 PM
To: [email protected]
Subject: [TurboGears] Re: idenity.current.user problem
"Lee Connell" <[EMAIL PROTECTED]> writes:
id = identity.current.user.user_name
AttributeError: 'NoneType' object has no attribute 'user_name'
Why would this be happening?
Are you really authenticated? Are you sure your session haven't expired?
--
Jorge Godoy <[EMAIL PROTECTED]>
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.6/617 - Release Date: 1/5/2007
11:11 AM
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.6/617 - Release Date: 1/5/2007
11:11 AM
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---