def METHOD_NAME(self):
    userid = self.request.form.get('userid')
    pw = self.request.form.get('password')
    mtool = api.portal.get_tool('portal_membership')
    # marker to tell us we need to force user to reset password later
    user = api.user.get(userid)
    user.setMemberProperties(mapping={
        'reset_password_required': True,
        'reset_password_time': time.time()
    })
    member = mtool.getMemberById(userid)
    member.setSecurityProfile(password=pw)