40b93c06a2f7409bb86d6dd0c6b057c036572ba9
1 ## Script (Python) "before_register"
2 ##bind container=container
6 ##bind subpath=traverse_subpath
10 portal
= sci
.getPortal()
14 from Products
.Plinn
.RegistrationTool
import DEFAULT_MEMBER_GROUP
15 from Products
.CMFCore
.utils
import getToolByName
17 gtool
= getToolByName(portal
, 'portal_groups')
18 mtool
= getToolByName(portal
, 'portal_membership')
21 if gtool
.getGroupById(DEFAULT_MEMBER_GROUP
) is None :
22 gtool
.addGroup(DEFAULT_MEMBER_GROUP
)
23 aclu
= portal
.acl_users
24 aclu
.changeUser(aclu
.getGroupPrefix() + DEFAULT_MEMBER_GROUP
, roles
=['Member', ])
26 g
= gtool
.getGroupById(DEFAULT_MEMBER_GROUP
)
27 g
.addMember(member
.getId())