[Zope] Login counter for each user

David Hassalevris bluepaul at earthlink.net
Sun Oct 17 18:19:01 EDT 2004


Martin,

Google is your friend!  I found this in 2 seconds by entering "manage_change_properties" into Google::



Quoting from the source ../lib/python/OFS/PropertyManager.py:

    def manage_editProperties(self, REQUEST):
        """Edit object properties via the web.
        The purpose of this method is to change all property values,
        even those not listed in REQUEST; otherwise checkboxes that
        get turned off will be ignored.  Use manage_changeProperties()
        instead for most situations.
        """

    def manage_changeProperties(self, REQUEST=None, **kw):
        """Change existing object properties.

        Change object properties by passing either a mapping object
        of name:value pairs {'foo':6} or passing name=value parameters
        """----- Original Message ----- 
  From: Martin Koekenberg 
  To: zope at zope.org 
  Sent: Sunday, October 17, 2004 1:31 PM
  Subject: [Zope] Login counter for each user


  Hello, 


  I want to count every time a user logs-in.
  I've a user map with the user profile in a DTML document. There are also 2 property's (Last login and logincount)
  I've also a python script for these 2 property's.
  But how can I do this 
  Logincoun = logincount + 1
  in the following python script:

  doc=getattr(context, soid)

  doc.manage_changeProperties(logincount=logincount + 1)   ????????
  doc.manage_changeProperties(lastlogin=sodate)

  Simple questing with (I think) a simple answer, but for me a great help.

  Thanks,

  Martin Koekenberg


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


  _______________________________________________
  Zope maillist  -  Zope at zope.org
  http://mail.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists - 
   http://mail.zope.org/mailman/listinfo/zope-announce
   http://mail.zope.org/mailman/listinfo/zope-dev )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20041017/05ff844e/attachment.htm


More information about the Zope mailing list