You are not logged in Log in Join
You are here: Home » Download Zope Products » Content Management Framework » CMF Documentation » CMF Design Documents » Standard CMF Interfaces » Tool Interfaces » Registration Tool

Log in
Name

Password

 

Registration Tool

May be somewhat out of date. Moved from cmf.zope.org, where it was last modifed 2000/11/01.

Purpose

Establishes policies for member registration. Depends on portal_membership. Is not aware of membership storage details.

Anonymous permission

isRegistrationAllowed(self, REQUEST)
Returns a boolean value indicating whether the user is allowed to add a member to the portal. Should always return 0 if the user does not have the Add Portal Member permission.
testPasswordValidity(self, password, confirm=None)
If the password is valid, returns None. If not, returns a string explaining why.
testPropertiesValidity(self, properties, member=None)
If the properties are valid, returns None. If not, returns a string explaining why.
generatePassword(self)
Generates a password which is guaranteed to pass the isPasswordAllowed test.

"Add Portal member" permission

addMember(self, id, password, roles=("Member",), domains="", properties=None)
Creates a PortalMember and returns it. The properties argument can be a mapping with additional member properties. Raises an exception if the given id already exists, the password does not comply with the policy in effect, or the authenticated user is not allowed to grant one of the roles listed (where Member is a special role that can always be granted); these conditions should be detected before the fact so that a cleaner message can be printed.
isMemberIdAllowed(self, id)
Returns 1 if the member ID is not in use and is not reserved.

"Mail forgotten password" permission

mailPassword(self, forgotten_userid, REQUEST)
Finds the given userid and executes a method called mail_password_template with member and password parameters. Raises an exception if the userid is not found.

"Set own password" permission

setPassword(self, password, domains=None)
Allows the authenticated member to set their own password.

"Set own properties" permission

setProperties(self, properties)
Allows the authenticated member to set their own properties.

No permission (called only from Python)

afterAdd(self, member, id, password, properties)
Called after a member has been added successfully.