Index: trunk/extensions/auth/GlobalAuth.php |
— | — | @@ -61,7 +61,7 @@ |
62 | 62 | $res = $dbr->select( $this->tablename, 'user_wiki', |
63 | 63 | array( 'user_name' => $username ), |
64 | 64 | $fname ); |
65 | | - while ( $row = $dbr->fetchObject( $res ) ) { |
| 65 | + foreach( $res as $row ) { |
66 | 66 | if ( $row->user_wiki == $this->thiswiki || $row->user_wiki == '*' ) { |
67 | 67 | return true; |
68 | 68 | } |
— | — | @@ -87,11 +87,11 @@ |
88 | 88 | $res = $dbr->select( $this->tablename, array( 'user_wiki', |
89 | 89 | 'user_name', 'user_password', |
90 | 90 | 'user_email', 'user_email_authenticated', |
91 | | - 'user_real_name', 'user_options', |
| 91 | + 'user_real_name', |
92 | 92 | 'user_token' ), |
93 | 93 | array( 'user_name' => $username ), |
94 | 94 | $fname ); |
95 | | - while ( $row = $dbr->fetchObject( $res ) ) { |
| 95 | + foreach( $res as $row ) { |
96 | 96 | if ( $row->user_wiki == $this->thiswiki || $row->user_wiki == '*' ) { |
97 | 97 | if ( $row->user_password == User::oldCrypt( $password, $row->user_id ) ) { |
98 | 98 | $this->data =& $row; |
— | — | @@ -175,7 +175,6 @@ |
176 | 176 | 'user_email' => $user->getEmail(), |
177 | 177 | 'user_email_authenticated' => $dbw->timestampOrNull( $user->getEmailAuthenticationTimestamp() ), |
178 | 178 | 'user_real_name' => $user->getRealName(), |
179 | | - 'user_options' => $user->encodeOptions(), |
180 | 179 | 'user_token' => $user->mToken ), |
181 | 180 | array( /*WHERE*/ 'user_id' => $this->data->user_id, |
182 | 181 | 'user_wiki' => $this->data->user_wiki ), |
— | — | @@ -213,7 +212,7 @@ |
214 | 213 | 'GlobalAuth::addUser' ); |
215 | 214 | $create = true; |
216 | 215 | $first = true; |
217 | | - while ( $row = $dbr->fetchObject( $res ) ) { |
| 216 | + foreach( $res as $row ) { |
218 | 217 | if ( $first ) { |
219 | 218 | # Set create to false for now. We've found entries for |
220 | 219 | # this username. Now we have to check whether we allow |
— | — | @@ -247,17 +246,16 @@ |
248 | 247 | 'user_email_authenticated' => $dbw->timestampOrNull( |
249 | 248 | $user->getEmailAuthenticationTimestamp() ), |
250 | 249 | 'user_real_name' => $user->getRealName(), |
251 | | - 'user_options' => $user->encodeOptions(), |
252 | 250 | 'user_token' => $user->mToken, |
253 | 251 | 'user_wiki' => $wiki ), |
254 | 252 | $fname ); |
255 | 253 | |
256 | 254 | # Query back to get the user_id |
257 | 255 | |
258 | | - $row = $dbr->selectRow( $this->tablename, array( 'user_wiki', |
| 256 | + $row = $dbw->selectRow( $this->tablename, array( 'user_wiki', |
259 | 257 | 'user_name', 'user_password', |
260 | 258 | 'user_email', 'user_email_authenticated', |
261 | | - 'user_real_name', 'user_options', |
| 259 | + 'user_real_name', |
262 | 260 | 'user_token' ), |
263 | 261 | array( 'user_name' => $user->getName(), |
264 | 262 | 'user_wiki' => $wiki ), |