I like users to be able to choose a login name other than their WikiName. This is particularly useful in intranets where people are used to signing in with a particular login. This works fine if you set up a
Twk0LoginName in the registration form (0 is nice because then it's optional). The problem is that the current scheme is built such that
LoginName is assumed to be authenticated somewhere outside the TWiki (so htpasswd isn't updated):
(from register)
if( ! $remoteUser ) {
htpasswdAddUser( htpasswdGeneratePasswd( $wikiName, $passwordA ) );
}
To get what I want (use the Login Name if given, otherwise the Wiki Name), you can change this to:
htpasswdAddUser( htpasswdGeneratePasswd( $remoteUser || $wikiName, $passwordA ) );
But this will tend to cause problems for other users. Two options I see are to either rely on the existence of $passwordA to tell you that you need an entry in .htpassword, or using a TWiki.cfg variable. But I think we shouldn't rely on $remoteUser to avoid .htpassword update.
--
RobNapier - 31 May 2002
I wonder how and if we should make this an adminstrative option that is set at install time..
SvenDowideit - 01 Jan 2003
The
RegisterCgiScriptRewrite implements this.
--
MartinCleaver - 19 Oct 2004