コード例 #1
0
 def delete_user(self, userid, REQUEST=None, RESPONSE=None):
     if userid:
         self.acl_users.userFolderDelUsers([userid])
         if REQUEST is not None:
             ptool = getToolByName(self.context, "plone_utils")
             ptool.addPortalMessage(_("User has been deleted."))
             portal_url = getToolByName(self.context, "portal_url")()
             return self.request.response.redirect(portal_url + "/@@usergroup-userprefs")
コード例 #2
0
 def disapprove_user(self, userid, REQUEST=None, RESPONSE=None):
     if userid:
         self.acl_users.disapproveUser(userid)
         if REQUEST is not None:
             ptool = getToolByName(self.context, "plone_utils")
             ptool.addPortalMessage(_("User has been disapproved."))
             portal_url = getToolByName(self.context, "portal_url")()
             return self.request.response.redirect(portal_url + "/@@user-approval?userid=" + userid)
コード例 #3
0
 def disapprove_user(self, userid, REQUEST=None, RESPONSE=None):
     if userid:
         self.acl_users.disapproveUser(userid)
         if REQUEST is not None:
             referer = REQUEST.get('HTTP_REFERER')
             if referer:
                 ptool = getToolByName(self.context, 'plone_utils')
                 ptool.addPortalMessage(_('User has been disapproved.'))
                 return self.request.response.redirect(referer)