From 04424ff0492290564b586d523bb575a3c54c5eac Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 26 Mar 2015 15:20:14 -0700 Subject: [PATCH] Made addAutopromoteOnceGroups check wfReadOnly Change-Id: I2fecf6616dd00cd34647f67298583ea8ec2977c0 --- includes/User.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/User.php b/includes/User.php index 46e347495d..62613e6b61 100644 --- a/includes/User.php +++ b/includes/User.php @@ -1388,7 +1388,7 @@ class User implements IDBAccessObject { global $wgAutopromoteOnceLogInRC, $wgAuth; $toPromote = array(); - if ( $this->getId() ) { + if ( !wfReadOnly() && $this->getId() ) { $toPromote = Autopromote::getAutopromoteOnceGroups( $this, $event ); if ( count( $toPromote ) ) { $oldGroups = $this->getGroups(); // previous groups @@ -1414,6 +1414,7 @@ class User implements IDBAccessObject { } } } + return $toPromote; } -- 2.20.1