Merge "Made addAutopromoteOnceGroups check wfReadOnly"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 26 Mar 2015 22:37:59 +0000 (22:37 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 26 Mar 2015 22:37:59 +0000 (22:37 +0000)
includes/User.php

index 2594dbc..2f9b716 100644 (file)
@@ -1392,7 +1392,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
@@ -1418,6 +1418,7 @@ class User implements IDBAccessObject {
                                }
                        }
                }
+
                return $toPromote;
        }