Index: trunk/extensions/Makebot/Makebot.class.php |
— | — | @@ -39,7 +39,12 @@ |
40 | 40 | $wgOut->addHtml( wfElement( 'p', NULL, NULL ) ); |
41 | 41 | $user = User::newFromName( $this->target ); |
42 | 42 | if( is_object( $user ) && !is_null( $user ) ) { |
43 | | - $user->loadFromDatabase(); |
| 43 | + global $wgVersion; |
| 44 | + if( version_compare( $wgVersion, '1.9alpha' ) < 0 ) { |
| 45 | + $user->loadFromDatabase(); |
| 46 | + } else { |
| 47 | + $user->load(); |
| 48 | + } |
44 | 49 | # Valid username, check existence |
45 | 50 | if( $user->getID() ) { |
46 | 51 | # Exists; check current privileges |