Back to index

plone3  3.1.7
members_delete_control.py
Go to the documentation of this file.
00001 ##parameters=ids, **kw
00002 ##title=Delete members
00003 ##
00004 from Products.CMFCore.utils import getToolByName
00005 from Products.CMFDefault.utils import Message as _
00006 
00007 mtool = getToolByName(script, 'portal_membership')
00008 
00009 mtool.deleteMembers(ids, REQUEST=context.REQUEST)
00010 
00011 if len(ids) == 1:
00012     return context.setStatus(True, _(u'Selected member deleted.'))
00013 else:
00014     return context.setStatus(True, _(u'Selected members deleted.'))