Please, add the following line to the
registration script, just before saving the user page topic generated:
# create user topic if not exist
if( ! &wiki::topicExists( $wiki::mainWebname, $wikiName ) ) {
$text = &wiki::readTemplate( "register" );
( $before, $after) = split( /%FORMDATA%/, $text );
for( $x = 0; $x < $formLen; $x++ ) {
$name = $formDataName[$x];
$value = $formDataValue[$x];
$value =~ s/[\n\r]/ /go;
if( ! ( ( $name eq "Wiki Name" )
|| ( $name eq "Password" )
|| ( $name eq "Confirm" ) ) ) {
$before .= " * $name\: $value\n";
}
}
$text = "$before$after";
#AS to automagically add the proper ALLOWTOPICCHANGE entry
$text =~ s/TWikiGuest/$wikiName/go;
#AS
$text =~ s/ {3}/\t/go;
&wiki::saveTopic( $wikiName, $text, "" );
}
This will automatically protect the user's page.
This way we can give add to the
redister.tmpl the following line:
* Set ALLOWTOPICCHANGE = %WIKINAME%
--
AndreaSterbini - 10 Nov 2000
I prefer to keep that optional to keep it in line with the
WikiCulture. Therefore I added this to the
register.tmpl file:
- Optionally write protect your home page: (set it to your WikiName)
Commited to
TWikiAlphaRelease.
--
PeterThoeny - 10 Nov 2000
I agree, thanks for the lesson (I mean it!).
--
AndreaSterbini - 13 Nov 2000