Back to index

plone3  3.1.7
prefs_portrait_delete.py
Go to the documentation of this file.
00001 ## Script (Python) "prefs_portrait_delete"
00002 ##bind container=container
00003 ##bind context=context
00004 ##bind namespace=
00005 ##bind script=script
00006 ##bind subpath=traverse_subpath
00007 ##parameters=userid, portrait=''
00008 ##title=Edit user
00009 ##
00010 
00011 from Products.CMFPlone import PloneMessageFactory as _
00012 
00013 #update portrait
00014 REQUEST=context.REQUEST
00015 portal_membership = context.portal_membership
00016 member=portal_membership.getMemberById(userid)
00017 
00018 portal_membership.deletePersonalPortrait(userid)
00019 context.plone_utils.addPortalMessage(_(u'Portrait deleted.'))
00020 
00021 return REQUEST.RESPONSE.redirect(REQUEST.HTTP_REFERER)