Question
I've been configuring User Authentication as per the installation manual with .htaccess/.htpasswd protection for editing etc, but when a new user registers .htpasswd is not being updated. All the other functions seem to work. The register script is being called because the user is being created in TWiki; I can change the password of an existing user who already has a manually-created entry in .htpasswd; the username/password pairs in .htpasswd are being read and used by apache authentication. It's just new users that are not getting added. I'm at a bit of a loss as to why the register script isn't updating the .htpasswd file? Any ideas?
Environment
--
ChrisStoddart - 02 Mar 2004 if( $remoteUser ) {
htpasswdAddUser( htpasswdGeneratePasswd( $remoteUser, $passwordA ) );
}
Answer
I've figured it out; the register script in /bin contains the line
if( ! $remoteUser ) {
htpasswdAddUser( htpasswdGeneratePasswd( $wikiName, $passwordA ) );
}
for adding to the .htpasswd file. So if you want to use a
TWikiRegistration topic that contains
an intranet login field, then .htpasswd will never be updated. I commented the '!' out of the if
statement above and now it ONLY works provided an intranet login name IS submitted. Since I have
made it a compulsory field in my
TWikiRegistration topic, there should be no problems.