* Fix regression in autoconfirm permission check
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 15 Oct 2006 22:41:28 +0000 (22:41 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 15 Oct 2006 22:41:28 +0000 (22:41 +0000)
Anons can't be autoconfirmed. Was broken by restructuring in r17004.

RELEASE-NOTES
includes/User.php

index 98a9ece..9f523f1 100644 (file)
@@ -49,6 +49,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 7562) Fix non-ASCII namespaces on Windows/XAMPP servers
 * Friendlier check for PHP 5 in command-line scripts; it's common for parallel
   PHP 4 and 5 installations to interfere on the command-line.
+* Fix regression in autoconfirm permission check
 
 
 == Languages updated ==
index eb5efe3..4fac12a 100644 (file)
@@ -1447,22 +1447,22 @@ class User {
                        $this->mEffectiveGroups[] = '*';
                        if( $this->mId ) {
                                $this->mEffectiveGroups[] = 'user';
-                       }
-                       
-                       global $wgAutoConfirmAge;
-                       $accountAge = time() - wfTimestampOrNull( TS_UNIX, $this->mRegistration );
-                       if( $accountAge >= $wgAutoConfirmAge ) {
-                               $this->mEffectiveGroups[] = 'autoconfirmed';
-                       }
-                       
-                       # Implicit group for users whose email addresses are confirmed
-                       global $wgEmailAuthentication;
-                       if( self::isValidEmailAddr( $this->mEmail ) ) {
-                               if( $wgEmailAuthentication ) {
-                                       if( $this->mEmailAuthenticated )
+                               
+                               global $wgAutoConfirmAge;
+                               $accountAge = time() - wfTimestampOrNull( TS_UNIX, $this->mRegistration );
+                               if( $accountAge >= $wgAutoConfirmAge ) {
+                                       $this->mEffectiveGroups[] = 'autoconfirmed';
+                               }
+                               
+                               # Implicit group for users whose email addresses are confirmed
+                               global $wgEmailAuthentication;
+                               if( self::isValidEmailAddr( $this->mEmail ) ) {
+                                       if( $wgEmailAuthentication ) {
+                                               if( $this->mEmailAuthenticated )
+                                                       $this->mEffectiveGroups[] = 'emailconfirmed';
+                                       } else {
                                                $this->mEffectiveGroups[] = 'emailconfirmed';
-                               } else {
-                                       $this->mEffectiveGroups[] = 'emailconfirmed';
+                                       }
                                }
                        }
                }