Item1712: Warning in TopicUserMapping when Registration is disabled

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Low Closed Engine TopicUserMappingContrib  
In my site I want to prevent automatic new user registration. So I set in LocalSite.cfg $Foswiki::cfg{Register}{EnableNewUserRegistration} = 0;

and (just to be sure) set the .htpasswd file to Readonly.

In this setup I get for each access the warning message in the warnXXX.txt logfile:
| 2009-06-11T12:23:01Z warning | TopicUserMapping has TURNED OFF EnableNewUserRegistration, because the password file is read only. |

In my opinion this message should not be issued, because I already unset the EnableNewUserRegistration by myself.

Suggested fix:
diff -u /var/lib/foswiki/lib/Foswiki/Users/TopicUserMapping.pm-orginal /var/lib/foswiki/lib/Foswiki/Users/TopicUserMapping.pm
--- /var/lib/foswiki/lib/Foswiki/Users/TopicUserMapping.pm-orginal   2009-04-25 20:25:18.000000000 +0200
+++ /var/lib/foswiki/lib/Foswiki/Users/TopicUserMapping.pm   2009-06-11 14:32:48.000000000 +0200
@@ -86,7 +86,8 @@
 #'none' is a special case, as it means we're not actually using the password manager for
 # registration.
     if ( $this->{passwords}->readOnly()
-        && ( $Foswiki::cfg{PasswordManager} ne 'none' ) )
+        && ( $Foswiki::cfg{PasswordManager} ne 'none' ) 
+        && ( $Foswiki::cfg{Register}{EnableNewUserRegistration} != 0 ) )
     {
         $session->logger->log('warning',
 'TopicUserMapping has TURNED OFF EnableNewUserRegistration, because the password file is read only.'

-- CharlesAdicke

Good little fix

Implemented with small modification

-- KennethLavrsen - 11 Jun 2009

ItemTemplate edit

Summary Warning in TopicUserMapping when Registration is disabled
ReportedBy CharlesAdicke
Codebase 1.0.5, trunk
SVN Range
AppliesTo Engine
Component TopicUserMappingContrib
Priority Low
CurrentState Closed
WaitingFor
Checkins Foswikirev:4107 Foswikirev:4108
TargetRelease patch
ReleasedIn 1.0.6
Topic revision: r5 - 22 Jun 2009, KennethLavrsen
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License