When i run the external method in plone site, it shows errors. 

The error shows.

Site Error
An error was encountered while publishing this resource. 
Error Type: AttributeError
Error Value: portal_memberdata


The following is the codings used in external methon.

    # make heading row
    row = makeRow()
    row[0] = 'member_id'
    row[1] = 'password'
    writer.writerow(row)
    
    for member in self.portal_membership.listMembers():
        
        # make row for each member full of blank values
        row = makeRow()
        member_id = member.getId()
        user = acl_users.getUser(name=member_id)
        password = user._getPassword()
        row[0] = member_id
        row[1] = password
        writer.writerow(row)

    request.RESPONSE.setHeader('Content-Type','application/csv')
    request.RESPONSE.setHeader('Content-Length',len(text.getvalue()))
    
request.RESPONSE.setHeader('Content-Disposition','inline;filename=%smembers.csv'
 %
                                
time.strftime("%Y%m%d-%H%M%S-",time.localtime()))
    return text.getvalue()


 
____________________________________________________________________________________
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail 
_______________________________________________
Zope maillist  -  Zope@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 )

Reply via email to