Logo Search packages:      
Sourcecode: zope-passwordresettool version File versions  Download package

def PasswordResetTool::PasswordResetTool::PasswordResetTool::expired (   self,
  datetime,
  now = None 
)
Tells whether a DateTime or timestamp 'datetime' is expired
with regards to either 'now', if provided, or the current
time.

Definition at line 311 of file PasswordResetTool.py.

                                         :
        """Tells whether a DateTime or timestamp 'datetime' is expired
        with regards to either 'now', if provided, or the current
        time."""
        if not now:
            now = DateTime()
        return now.greaterThanEqualTo(datetime)

# these are possible customization points I'm not really sure we need.
#
#    def getRequestRecord(self, randomstring):
#        """Returns a tuple (userid,expiration) that maps to a specific
#        reset request, as keyed by the 'randomstring'.
#
#        Expiration is a DateTime."""
#
#    def setRequestRecord(self, randomstring, userid, expiry):
#        """Create a reset request record keyed by 'randomstring'
#        containing 'userid' and 'expiry' (which should be a DateTime)."""
#
#    def removeRequestRecord(self, randomstring):
#        """Destroy the request reset record keyed by 'randomstring'."""
#
#    def getAllRequests(self):
#        """Returns a list of all reset requests in a tuple
#        '(randomstring, userid, expiry)'.
#
#        Used primarily for housekeeping. Expiry is a DateTime."""


Generated by  Doxygen 1.6.0   Back to index