• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

I have just upgraded to 4.0.4 (same problem is in 4.0.3)

After the upgrade the registration is broken so that peoples email address is no longer copied to the Users Home page.

It is supposed to happen unless you use store passwords in .htpasswd.

So something is goofed up in the registration code again.

This is a show stopper issue for any corporate use where you use LDAP or similar authentication and not .htpasswd.

We need a hotfix for it ASAP.

Here is my LocalSite.cfg

$TWiki::cfg{DataDir} = '/var/www/twiki404/data';
$TWiki::cfg{Password} = 'hidden';
$TWiki::cfg{Site}{Lang} = 'en';
$TWiki::cfg{LocalesDir} = '/var/www/twiki404/locale';
$TWiki::cfg{ScriptUrlPath} = '/twiki404/bin';
$TWiki::cfg{DefaultUrlHost} = 'http://192.168.1.2';
$TWiki::cfg{Site}{FullLang} = 'en-us';
$TWiki::cfg{PubUrlPath} = '/twiki404/pub';
$TWiki::cfg{PubDir} = '/var/www/twiki404/pub';
$TWiki::cfg{TemplateDir} = '/var/www/twiki404/templates';
$TWiki::cfg{Site}{CharSet} = 'iso-8859-15';
$TWiki::cfg{Languages}{fr}{Enabled} = 0;
$TWiki::cfg{Languages}{pl}{Enabled} = 0;
$TWiki::cfg{AntiSpam}{HideUserDetails} = 0;
$TWiki::cfg{Plugins}{WysiwygPlugin}{Enabled} = 1;
$TWiki::cfg{SMTP}{SENDERHOST} = '';
$TWiki::cfg{Plugins}{EmptyPlugin}{Enabled} = 1;
$TWiki::cfg{SMTP}{MAILHOST} = 'localhost';
$TWiki::cfg{Languages}{da}{Enabled} = 0;
$TWiki::cfg{Register}{NeedVerification} = 0;
$TWiki::cfg{NumberOfRevisions} = 5;
$TWiki::cfg{Languages}{de}{Enabled} = 0;
$TWiki::cfg{Languages}{'zh-tw'}{Enabled} = 0;
$TWiki::cfg{LoginManager} = 'TWiki::Client::ApacheLogin';
$TWiki::cfg{PasswordManager} = 'none';
$TWiki::cfg{Sessions}{ExpireAfter} = '-21600';
$TWiki::cfg{INCLUDE}{AllowURLs} = 1;
$TWiki::cfg{Languages}{es}{Enabled} = 0;
$TWiki::cfg{Languages}{pt}{Enabled} = 0;
$TWiki::cfg{Languages}{sv}{Enabled} = 0;
$TWiki::cfg{Languages}{it}{Enabled} = 0;
$TWiki::cfg{Register}{AllowLoginName} = 1;
$TWiki::cfg{Languages}{'zh-cn'}{Enabled} = 0;
$TWiki::cfg{Languages}{nl}{Enabled} = 0;
$TWiki::cfg{Plugins}{RenderListPlugin}{Enabled} = 1;
1;

KJL

I have been looking at Register.pm

There is a block of code that says

my %SKIPKEYS = (
    'Photo' => 1,
    'WikiName' => 1,
    'LoginName' => 1,
    'Password' => 1,
    'Email' => 1
   );

I would change this to

my %SKIPKEYS = (
    'Photo' => 1,
    'WikiName' => 1,
    'LoginName' => 1,
    'Password' => 1,
    'Email' => ($TWiki::cfg{PasswordManager} eq 'none' ? 0 : 1)
   );

Logic is that when you are using a password manager it must be storing the password in .htaccess or similar place.

And if not - it must be the web server that authenticates by other means. And then you need to copy the email address to the users topic

I have not found any other place where there is any logic around if Email address is stored or not.

Unless someone have objections I will check this in later tonight when I return from work and have access to my normal SVN checkout machine.

KJL


On reflection, I object. This is not correct solution. The default password manager (the one that kicks in when {PasswordManager is none) is supposed to write the email to the user topic. SKIPKEYS should not be modified.

I just checked and ran the unit tests, and if there is form attached to the user topic then the email gets added there correctly. The problem is limited to the injection of the bullet field when there is no user form, and is the result of the order in which the email and the topic contents are written. Please use this patch instead:

Index: lib/TWiki/UI/Register.pm
===================================================================
--- lib/TWiki/UI/Register.pm    (revision 10815)
+++ lib/TWiki/UI/Register.pm    (working copy)
@@ -313,13 +313,13 @@

     my $userTopic =
       $session->{users}->addUserToMapping( $user, $session->{user} );
-    $user->setEmails( $row->{Email} );

     if( $doOverwriteTopics or !$session->{store}->topicExists( $row->{webName}, $row->{WikiName} ) ) {
         $log .= _createUserTopic($session, 'NewUserTemplate', $row);
     } else {
         $log .= $b.' Not writing topic '.$row->{WikiName}."\n";
        }
+    $user->setEmails( $row->{Email} );

     #if ($TWiki::cfg{EmailUserDetails}) {
         # If you want it, write it.
@@ -794,13 +794,13 @@

     my $userTopic = $session->{users}->addUserToMapping( $user, $agent);

-    $user->setEmails( $data->{Email} );
-
     # inform user and admin about the registration.
     my $status = _emailRegistrationConfirmations( $session, $data );

     my $log = _createUserTopic($session, 'NewUserTemplate', $data);

+    $user->setEmails( $data->{Email} );
+
     # write log entry
     if ($TWiki::cfg{Log}{register}) {
         $session->writeLog( 'register', $TWiki::cfg{UsersWebName}.'.'.$data->{WikiName},

CC

Thanks for fixing this so quickly.

I will make a hotfix file for it for the download page. (Just simply the Register.pm file. This one is important enough for that and a typical example of a bug that affects a major part of installations and where the fix should be visible to you already when you download and install TWiki the first time.

KJL

Closed in 4.0.5 KJL

ItemTemplate
Summary Emails are not stored in user topic when TWiki setup in a corporate environment
ReportedBy TWiki:Main.KennethLavrsen
Codebase ~twiki4, 4.0.3
SVN Range Thu, 29 Jun 2006 build 10750
AppliesTo Engine
Component

Priority Urgent
CurrentState Closed
WaitingFor

Checkins 10817 11151 11154 11390
TargetRelease patch
Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r12 - 2006-11-14 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback