from BTrees.OOBTree import OOBTree
from Products.CMFCore.permissions import ManagePortal, AddPortalMember
from Products.CMFCore.exceptions import AccessControl_Unauthorized
from BTrees.OOBTree import OOBTree
from Products.CMFCore.permissions import ManagePortal, AddPortalMember
from Products.CMFCore.exceptions import AccessControl_Unauthorized
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.utils import getUtilityByInterfaceName
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.utils import getUtilityByInterfaceName
from Products.GroupUserFolder.GroupsToolPermissions import ManageGroups
from Products.Plinn.utils import Message as _
from Products.Plinn.utils import translate
from Products.GroupUserFolder.GroupsToolPermissions import ManageGroups
from Products.Plinn.utils import Message as _
from Products.Plinn.utils import translate
MODE_MANAGER = 'manager'
security.declarePublic('MODE_MANAGER')
MODE_REVIEWED = 'reviewed'
security.declarePublic('MODE_REVIEWED')
MODE_MANAGER = 'manager'
security.declarePublic('MODE_MANAGER')
MODE_REVIEWED = 'reviewed'
security.declarePublic('MODE_REVIEWED')
-MODES = [MODE_ANONYMOUS, MODE_MANAGER, MODE_REVIEWED]
+MODES = [MODE_ANONYMOUS, MODE_PASS_ANONYMOUS, MODE_MANAGER, MODE_REVIEWED]
urlTool = getToolByName(self, 'portal_url')
portal = urlTool.getPortalObject()
urlTool = getToolByName(self, 'portal_url')
portal = urlTool.getPortalObject()
portal.manage_permission(AddPortalMember, roles = ['Anonymous', 'Manager'], acquire=1)
elif mode == MODE_MANAGER :
portal.manage_permission(AddPortalMember, roles = ['Manager', 'UserManager'], acquire=0)
portal.manage_permission(AddPortalMember, roles = ['Anonymous', 'Manager'], acquire=1)
elif mode == MODE_MANAGER :
portal.manage_permission(AddPortalMember, roles = ['Manager', 'UserManager'], acquire=0)
self.clearExpiredPasswordResetRequests()
mtool = getUtilityByInterfaceName('Products.CMFCore.interfaces.IMembershipTool')
member = mtool.getMemberById(userid)
self.clearExpiredPasswordResetRequests()
mtool = getUtilityByInterfaceName('Products.CMFCore.interfaces.IMembershipTool')
member = mtool.getMemberById(userid)
+ if not member :
+ try :
+ checkEmailAddress(userid)
+ member = mtool.searchMembers('email', userid)
+ if member :
+ userid = member[0]['username']
+ member = mtool.getMemberById(userid)
+ except EmailAddressInvalid :
+ pass