[Zope-CMF] Fixed member's login_time

Jens Vagelpohl jens at dataflake.org
Sat Oct 16 19:27:02 EDT 2004


If you find a bug you should post a collector issue:

http://www.zope.org/Collectors/CMF

Anything else is very likely to get lost.

jens


On Oct 16, 2004, at 22:55, Duane Raymond wrote:

> Hi,
>
> I noticed that a member's login_time and last_login_time properties
> weren't updated when a member logged in.  I solved the issue by
> editing the logged_In python script with the code below.  However I
> would have thought this was supposed to be standard considering the
> fields are already there.  Have I missed something?
>
> If this is missing - perhaps someone with check-in rights could check
> this code and include it in the logged_in script for future versions?
>
> Cheers,
>
> Duane
>
> # Updates member's login_time and last_login_time date-time once they
> are loggin in.
> # It seems when membership failes, member.id = 'acl_users'
> setMemberProperties=context.plone_utils.setMemberProperties
> now = DateTime()
> previouslogin = member.login_time
> if member.id is not None and member.id != 'acl_users':
>     setMemberProperties(member.id, login_time=now)
>     setMemberProperties(member.id, last_login_time=previouslogin)
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF at lists.zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
>
> See http://collector.zope.org/CMF for bug reports and feature requests
>

---------------

Jens Vagelpohl			jens at zetwork.com
Software Engineer			Zope - done medium rare
Zetwork GmbH				http://www.zetwork.com/



More information about the Zope-CMF mailing list