Introduction
History
==================
In the early January of the year 2005 I decided that I had the need to use a special self written folder for the memberarea of each member. I started trying to utilize preCreateMemberArea.py in the skins dir of my product, but that didn't work out as expected, since a call of getAuthenticatedMember() within that script leads to an endless loop. To discover that I had to debug for about 2 days discovering that my steps were utterly useless.
Overview
==================
The only true way to override the generation of the memberarea of a user is to write your custom membership_tool. Quite naturally this is a realy tricky thing, since you can trash portal_membership which in turn prevents a lot of things from wroking. It can even lead to the destruction of anything member related (depending on what is malfunctioning).
So anyone who hasn't got **advanced plone programming skills** *keep your hands off* this tutorial. You could take out your whole plone site when doing something wrong, probably resulting in heavy data loss.
This tutorial is provided as is - no response is taken when something fails or goes wrong.
I have tested the steps to my best knowledge and they work on my plone site.
Anyway **never, ever** try this out in a production invironment.
Motivation
----------
The idea to create your own MembershipTool might sound a bit like overkill at first, but it's indeed not. It just boils down to deriving your custom tool from the MembershipTool of CMFMember that already provides all functionality need by a MembershipTool. Still there is one major drawback caused by the usage of CMFMember: Whenever you upgrade (migrate) your CMFMember product, you'll have to install your custom MembershipTool anew afterwards. This is caused by the way the migration (upgrade) of CMFMember works, because during this process the MembershipTool is normally replaced by the one the new CMFMember product carries along.
If you just utilize the code of this tutorial, you'll only have to restart your zope instace in order to replace the CMFMember's MembershipTool by your custom one. This is probably not a perfect solution, since whenever you restart the MembershipTool gets replaced, but for development purposes it's quite comfortable. This is related to the fact, that reloading your product and utilizing the quickinstaller / external method to reinstall your product, replaces the MembershipTool too.
Writting your own custom MembershipTool does not only allow you to override the creation of the member's area, but you could override any function or extend it with new functions.
Taking the story even one step further you can provide for any Plone Tool your custom one.
Requirements
==================
* Plone 2.0.x
* CMFMember 1.0 beta5
* **advanced plone programming skills**

