[Zope] Login by webform/session variables?
Andrew Kenneth Milton
akm@theinternet.com.au
Fri, 28 Sep 2001 13:53:57 +1000
+-------[ miah34@msn.com ]----------------------
| Hi all.
Hey there.
| It seems to me that a user can log on by a form and be authenticated by
| LoginManager, for example. But that only gives them a role (I believe),
| let's say authorized_user. But, what I need is a way to remember WHO they
| are, not just what role they have. I'm very new to both Zope and web design
| in general, so any help would be appreciated.
There is a user object, available in most places called AUTHENTICATED_USER,
sometimes you need to explicitly reference it as REQUEST.AUTHENTICATED_USER
To get the username, you simply call AUTHENTICATED_USER.getUserName()
You don't need to set any variables to know who is logged in, Zope takes
care of that for you.
--
Totally Holistic Enterprises Internet| | Andrew Milton
The Internet (Aust) Pty Ltd | |
ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068 |akm@theinternet.com.au|