From b19cf7f3aa2c76535150e1757719ad003131f28c Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 15 Oct 2006 22:41:28 +0000 Subject: [PATCH] * Fix regression in autoconfirm permission check Anons can't be autoconfirmed. Was broken by restructuring in r17004. --- RELEASE-NOTES | 1 + includes/User.php | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 98a9ece767..9f523f156a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/User.php b/includes/User.php index eb5efe3ddd..4fac12af1f 100644 --- a/includes/User.php +++ b/includes/User.php @@ -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'; + } } } } -- 2.20.1