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

def PasswordResetTool::PasswordResetTool::PasswordResetTool::requestReset (   self,
  userid 
)

Interface fulfillment ##.

Ask the system to start the password reset procedure for
user 'userid'.

Returns a dictionary with the random string that must be
used to reset the password in 'randomstring', the expiration date
as a DateTime in 'expires', and the userid (for convenience) in
'userid'. Returns None if no such user.

Definition at line 91 of file PasswordResetTool.py.

00091                                   :
        """Ask the system to start the password reset procedure for
        user 'userid'.

        Returns a dictionary with the random string that must be
        used to reset the password in 'randomstring', the expiration date
        as a DateTime in 'expires', and the userid (for convenience) in
        'userid'. Returns None if no such user.
        """
        if not self.getValidUser(userid):
            return None
        randomstring = self.uniqueString(userid)
        expiry = self.expirationDate()
        self._requests[randomstring] = (userid, expiry)
        
        self.clearExpired(10)   # clear out untouched records more than 10 days old
                                # this is a cheap sort of "automatic" clearing
        self._p_changed = 1
        
        retval = {}
        retval['randomstring'] = randomstring
        retval['expires'] = expiry
        retval['userid'] = userid
        return retval

    security.declarePublic('resetPassword')
    def resetPassword(self, userid, randomstring, password):


Generated by  Doxygen 1.6.0   Back to index