Registration throws an error when login name is not defined. Is this intentional?
Before, it used to use your
WikiName.
Line 758 in Register.pm
--
TWiki:Main/AndrewRJones
- 25 Apr 2007
Sounds like a configure setup error. If you do not want a unique user name you need to turn it off.
The login name must be given on the registration page when {Register}{AllowLoginName} is enabled in configure
When you disable this setting then the registration page changes so it no longer queries for username and so it no longer becomes a mandatory field.
If you use a corporate LDAP authentication for example you turn this ON and then you need to register with username and wikiname because TWiki needs to build the mapping between the two. In TWiki 4.1 the
TWikiUsers topic is the file that contains this map.
--
TWiki:Main.KennethLavrsen
- 25 Apr 2007
Even when {Register}{AllowLoginName} is disabled, a login name is still expected in Register.pm. I'm having trouble following the code, but I think there is a bug somewhere. If you look at line 758 in Register.pm, you can see that it expects a login name to exist, but from what I can tell does not check the configure setting, or it would set the login name to the user name.
--
AndrewRJones - 26 Apr 2007
Now I am confused. You have LDAP authentication and no login name? I have never heard about that before.
The normal use case is that you authenticate against the LDAP with a login name which is normally not your
WikiName. And once you are authenticated you are mapped to the
WikiName you registered as.
And then YES, then you need to give a user name in the registration page.
--
TWiki:Main.KennethLavrsen
- 26 Apr 2007
I assume you are running off subversion?
The registration code is supposed to default the login name to the wikiname if login names are turned off; see line 404.
I have registered here in my code (MAIN) with and without login names, and it works fine. So it has to be something to do with your configuration, I think. Can you describe how to reproduce this problem?
--
TWiki:Main.CrawfordCurrie
- 26 Apr 2007
I believe I am having the same issue as
AndrewRJones.
I have the following values:
{Register}{AllowLoginName} = 0
{UseClientSessions} = 1
{LoginManager} = TWiki::Client::TemplateLogin
{MapUserToWikiName} = 0
{PasswordManager} = TWiki::Users::HtPasswdUser
I modified the _validateRegistration subroutine to get past this error.
Register.pm - Line 1034 change:
#unless( $data->{LoginName} =~ /$TWiki::cfg{LoginNameFilterIn}/ ) {
if( $TWiki::cfg{Register}{AllowLoginName} && !($data->{LoginName} =~ /$TWiki::cfg{LoginNameFilterIn}/) ) {
After changing that line, I found that the
WikiName does not appear to be passed correctly. It is always a null value. I ran the register script from the command line as the user running the webserver, passing in the values from the web form and I receive the confirmation email.
--
TWiki:Main.DonaldClaus
- 03 May 2007
Except for the Template login I run the exact same setup on 4.1.2.
I do not get any errors about login name not defined.
Which TWiki version are you running?
And what else did you modify?
--
TWiki:Main.KennethLavrsen
- 12 May 2007
Sorry I have not came back to this in a while.
I am running a SVN based install from the Main branch. I am not using LDAP, all I want to do for this installation is register with my wiki name and use that as my login name, so I can log in using the template login.
All I have done is changed the settings in configure.
{Register}{AllowLoginName} = 0
{Register}{NeedVerification} = 0
{Register}{EnableNewUserRegistration} = 1
{LoginManager} = 'TWiki::LoginManager::TemplateLogin'
{PasswordManager} = 'TWiki::Users::HtPasswdUser'
Think these are all the configuration settings that are relevant.
--
TWiki:Main.AndrewRJones
- 14 May 2007
Thanks, that's exactly what we needed to know. I am able to reproduce Andrew's problem on MAIN using those settings. Confirmed.
CC
OK, I'm pretty sure your problem is you don't have write access to
TWikiUsers. Check your warnings log.
I changed the code to be more sensible during upgrades and such (it no longer ships
TWikiUsers)
CC