Index: trunk/extensions/UserDailyContribs/api/ApiUserDailyContribs.php |
— | — | @@ -14,8 +14,9 @@ |
15 | 15 | $this->dieUsage( 'Invalid username', 'bad_user' ); |
16 | 16 | } |
17 | 17 | |
18 | | - global $wgAuth; |
19 | | - if ( !$wgAuth->userExists( $userName ) ) { |
| 18 | + global $wgAuth, $wgUserDailyContributionsApiCheckAuthPlugin; |
| 19 | + |
| 20 | + if ( $wgUserDailyContributionsApiCheckAuthPlugin && !$wgAuth->userExists( $userName ) ) { |
20 | 21 | $this->dieUsage( 'Specified user does not exist', 'bad_user' ); |
21 | 22 | } |
22 | 23 | $now = time(); |
Index: trunk/extensions/UserDailyContribs/UserDailyContribs.php |
— | — | @@ -32,6 +32,16 @@ |
33 | 33 | $wgAPIModules['userdailycontribs'] = 'ApiUserDailyContribs'; |
34 | 34 | |
35 | 35 | /** |
| 36 | + * Whether or not API calls should require |
| 37 | + * that the given user name exists in whatever authentication |
| 38 | + * is set up in $wgAuth. Note that by default, on a plain install |
| 39 | + * there is no authentication plugin, hence all checks for existance |
| 40 | + * return to false. |
| 41 | + * If you use CentralAuth you'd probably want to set this to true. |
| 42 | + */ |
| 43 | +$wgUserDailyContributionsApiCheckAuthPlugin = false; |
| 44 | + |
| 45 | +/** |
36 | 46 | * Get the number of revisions a user has made since a given time |
37 | 47 | * |
38 | 48 | * @param $time beginning timestamp |