Question
I have successfully set up TWiki to authenticate using LDAP (through Apache2). However, although I am about to setup a PHP script (
http://phpLDAPAdmin.sf.net
) to allow the public to create their own LDAP accounts, and therefore gain access to the Wiki without needing admin intervention, I have not been able to think of a way to automatically create the User Topics after registration. Without the User topics, the signatures won't link, and the users can't set their own preferences.
I'm thinking on way would be to hack the registration script to execute an external program, perhaps mimic a web browser to run TWiki's 'register' script with certain parameters to create the user topic.
However, is this possible, and what are the URL parameters used to create the user topic
only, without creating the user in a passwd file or messing with any form of authentication (since that is left entirely to LDAP).
Thanks.
Environment
| TWiki version: |
TWikiBetaRelease |
| TWiki plugins: |
|
| Server OS: |
Gentoo Linux |
| Web server: |
Apache2 w/ OpenLDAP & ModPerl. |
| Perl version: |
5.8.1 |
| Client OS: |
|
| Web Browser: |
|
--
AdamTheo - 08 Dec 2003
Answer
You basically need to mimic what the register script does, e.g. create the user topic and optionally update the
TWikiUsers topic: Do the users have a
WikiWord to login? If not you need to update the
TWikiUsers topic with a
-
JoeSmith - jsmith - 15 Dec 2003
bullet. This will map the user's login name to her WikiName.
The register script runs in two modes, depending on the supplied parameters:
- If parameter named
Twk1LoginName is supplied: (This is typical for Intranet installations)
- The user topic is created, TWikiUsers updated, and e-mail is sent
- Else: (This is typical for public installations)
- Same as above, plus
.htpasswd file is updated
If you use http to run the register script you need to supply the same parameters the
TWikiRegistration form does. Note: Use the original topic of the distribution, the one here on TWiki.org is changed to handle
.htpasswd updates.
You can tweak the form; input field names (aka parameter names) must start with
Twk, followed by
1 (for required fields) or
0 (for optional fields), followed by the actual name. Out of the box it is:
Twk1WikiName,
Twk1LoginName,
Twk1Email,
Twk0Phone,
Twk0Department,
Twk1Location,
Twk0Comment
--
PeterThoeny - 16 Dec 2003