[Zope] dedicated folder for each user
Dieter Maurer
dieter@handshake.de
Tue, 29 Aug 2000 23:03:49 +0200 (CEST)
Vincent writes:
> is it possible to creat automatically a folder with the name of the logged
> user ?
Yes!
In general, you can do anything programmatically that you can
do with the management interface.
Because Zope is open source, you can learn from the management
interface, how to do it.
You take the following steps:
* locate the source for the form that asks you for the
required information.
In your case, this will probably be a "*.dtml" file
in the OFS folder.
* Usually, the form "action" tells you the function/method
that performs the operation (after the form is submitted).
Sometimes, the function/method is given by the
button name or button value (if the name end in ":method").
* If you are lucky (most of the time, you will), then
the function/method is documented in the object
reference (-> zdp.zope.org), the Zope 2.2 online help
or the interface Wiki (-> zope.org -> WikiCentral).
* If you are not lucky, you can derive the function/method
interface from the form variables.
The request object contains variables for each (most of the)
form input element (maybe with ":<type>" suffixes stripped
and executed).
For your special task, you must also know, that
the logged in user is described by "AUTHENTICATED_USER"
and that this object has a method "getUserName".
Dieter