[Zope] LoginManager - logging out
Aleksander Salwa
ololo@zeus.polsl.gliwice.pl
Mon, 18 Dec 2000 06:57:17 +0100 (CET)
> I used this code in my "logoutForm" to logout user in my old setup
> (LoginManager-0_8_7a1, ZPatterns-0-4-2a1 and Zope 2.2.1):
> <dtml-call "AUTHENTICATED_USER.logout()">
(I assume this code is correct, as it is included in default logoutForm in
LoginManager.)
> It doesn't work when using LoginManager-0-8-8b1 + ZPatterns-0-4-3b2 +
> Zope 2.2.4.
I forgot to write HOW it fails:
Error Type: AttributeError
Error Value: logoutUser
Traceback (innermost last):
File
/usr/local/digicool/Zope-2.2.4-linux2-x86/lib/python/ZPublisher/Publish.py,
line 222, in publish_module
File
/usr/local/digicool/Zope-2.2.4-linux2-x86/lib/python/ZPublisher/Publish.py,
line 187, in publish
File
/usr/local/digicool/Zope-2.2.4-linux2-x86/lib/python/Zope/__init__.py,
line 221, in zpublisher_exception_hook
(Object: ProviderContainer)
File
/usr/local/digicool/Zope-2.2.4-linux2-x86/lib/python/ZPublisher/Publish.py,
line 171, in publish
File
/usr/local/digicool/Zope-2.2.4-linux2-x86/lib/python/ZPublisher/mapply.py,
line 160, in mapply
(Object: logoutForm)
File
/usr/local/digicool/Zope-2.2.4-linux2-x86/lib/python/ZPublisher/Publish.py,
line 112, in call_object
(Object: logoutForm)
File
/usr/local/digicool/Zope-2.2.4-linux2-x86/lib/python/OFS/DTMLDocument.py,
line 177, in __call__
(Object: logoutForm)
File
/usr/local/digicool/Zope-2.2.4-linux2-x86/lib/python/DocumentTemplate/DT_String.py,
line 528, in __call__
(Object: logoutForm)
File
/usr/local/digicool/Zope-2.2.4-linux2-x86/lib/python/DocumentTemplate/DT_Util.py,
line 337, in eval
(Object: AUTHENTICATED_USER.logout())
(Info: AUTHENTICATED_USER)
File <string>, line 0, in ?
File
/usr/local/digicool/Zope-2.2.4-linux2-x86/lib/python/Products/LoginManager/UserSources.py,
line 107, in logout
(Object: BetterLocalRolesMixin)
AttributeError: (see above)
> I've found a work-around:
> <dtml-call "acl_users.logoutUser(AUTHENTICATED_USER.getId())">
> It logouts user as expected.
>
> But, can anybody tell me, why the former one doesn't work as it should ?
ololo@zeus.polsl.gliwice.pl
/--------------------------------------\
| `long long long' is too long for GCC |
\--------------------------------------/