Extension talk:UserAdmin
This page used the LiquidThreads extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
Update for 1.17
This is great! I wish it worked on 1.17, though. Any idea on when an update might be published?
--Fulv 06:21, 28 July 2011 (UTC)
- This extension was created for my company and I don't currently have any requirements to upgrade 1.17. So no plans here. Perhaps some more motivated individual will come along.
- I haven't tested it, but the extension should work in 1.17 with the exception of purge user. LanceGatlin 17:03, 19 September 2011 (UTC)
- Verified that this indeed works on 1.17.
- r.b. 166.67.66.7 20:31, 17 April 2012 (UTC)
Deletion
How does this extension handle the reassignment of deleted users' contributions? Kudu ~I/O~ 21:13, 2 September 2011 (UTC)
- Mediawiki already has a concept of "delete" that implies the ability to undo the delete. I use the term "purge" to mean deletion that cannot be undone. When purging a user, the user's content is also purged. This includes revisions, uploads, pages, etc. The purge user function is intended to be used to get rid of spam accounts. If you want to "delete" a user (and preserve their content), block user should be used. LanceGatlin 17:02, 19 September 2011 (UTC)
Error Report User Names with lowerCase first character
User Names with lowercase first characters will result in nothing. No user will be added, thats OK while Media Wiki will not allow this User Names. But there are no error Message. Thats not OK
Eather give an error Message or do it like MediWiki, Uppercase the first character by force.
Thank you
btw. A Update to 1.17 would be fine 91.23.246.228 10:27, 15 September 2011 (UTC)
- Extension should work in 1.17 with exception of purging.
- To clarify your bug: When incorrectly creating a user with a lower-case first name, no user is added, but no error message is displayed.? LanceGatlin 17:04, 19 September 2011 (UTC)
Wrong parameters for Exception when changing user password
Bug: edit a user, set a new password or edit its groups, save change: Fatal error: Wrong parameters for Exception([string $exception [, long $code ]]) in /www/w/extensions/UserAdmin/SpecialUADMBase.class.php on line 43. Running MediaWiki 1.16.5, PHP 5.2.17 (cgi), MySQL 5.0.90-log. --almaghi 12:50, 19 September 2011 (UTC)
- It sounds like the exception reporting for a failure isn't working, I'll look into this. Did you put some text into the reason field? LanceGatlin 17:13, 19 September 2011 (UTC)
- I just came across this error in my install, it may be that PHP < 5.3 only has two parameters to the Exception constructor.
- I am running MediaWiki 1.17, PHP 5.2.11
- I changed "extensions/UserAdmin/SpecialUADMBase.class.php" thusly:
//parent::__construct($message, $code, $previous);
parent::__construct($message, $code);
- That error went away, and 1.17 now seems to work with this extension.
- Thanks,
- r.b. 166.67.66.7 20:25, 17 April 2012 (UTC)
- Your answer worked like a charm. Can confirm this solution. 188.204.222.226 11:56, 30 August 2013 (UTC)
Should the update.php script be ran after installing this extension ?
almaghi 13:05, 19 September 2011 (UTC)
- No, update.php is not necessary for UserAdmin extension. LanceGatlin 17:21, 19 September 2011 (UTC)
Purge user throws an error
Hi. I'm running version v0.9.0-0-gdf8645d with MW 1.16.5. When I try to purge a user I get the following error:
Fatal error: Wrong parameters for Exception([string $exception [, long $code ]]) in /home/webapps/wpcc/extensions/UserAdmin/SpecialUADMBase.class.php on line 32
Any ideas?
Thanks Mitchelln 10:27, 4 November 2011 (UTC)
Special Pages not working after installation
2.102.182.125 22:41, 31 January 2012 (UTC)
Does not work on 1.18
For your information, this extension does not work with MediaWiki 1.18: none of the Special pages can be loaded. Robinson Weijman (talk) 09:34, 17 February 2012 (UTC)
- for the Version 1.18.0
- Special Page Loaded with all features but could not add user the folliwing message comes up
- __________
- The website cannot display the page
___
HTTP 500
Most likely causes:
- •The website is under maintenance.
- •The website has a programming error.
- __
- any solution ?
- thanks 82.5.93.134 13:07, 16 March 2012 (UTC)
PHP Fatal error: Call to private method User::loadGroups() from context 'SpecialUADMBase'
Loading the page Special:UserAdmin causes the above error.
User Administration (Version 0.5.0) (installed via git) Mediawiki 1.18.0 (r113885) PHP 5.2.10 Pgr94 (talk) 00:11, 23 March 2012 (UTC)
- Replacing loadGroups() with public getGroups() (which calls loadGroups() ) in all instances of UserAdmin will make the error go away...
- On using Special:UserAdmin with MW18.2 I'm now getting heaps of warnings like:
- Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /MYURL/public_html/wiki/includes/User.php on line 2295
- Warning: array_unique() [function.array-unique]: The argument should be an array in /MYURL/public_html/wiki/includes/User.php on line 2295
- Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /MYURL/public_html/wiki/extensions/UserAdmin/SpecialUserAdminPanel.class.php on line 395
- Warning: Invalid argument supplied for foreach() in /MYURL/public_html/wiki/extensions/UserAdmin/SpecialUserAdminPanel.class.php on line 397
395 $groups = array_diff($user->getEffectiveGroups(), $user->getImplicitGroups());
396 $groupsHTML = ;
397 foreach ($groups as $group)
398 $groupsHTML .= User::makeGroupLinkHtml($group, htmlspecialchars(User::getGroupMember($group))) . ', ';
399 $groupsHTML = substr($groupsHTML, 0, strlen($groupsHTML) - 2);
Bug in Recent Changes when user deleted
I get a strange bug when I delete an (spam)user.
If there is a "Recent changes" transclusion in a page : - the title of the page becomes "Special:RecentChanges/15,hideminor" - the title (<h2>Recent changes</h2> for instance) just above the "Recent changes" transclusion shows "UNIQ2faf6df0429204f9-h-0--QINU Recent changes"
If I suppress the "Recent changes" transclusion, the bug disappears. And few days later, when the line "user XXX deleted" disappears, then this bug disappears.
Anyone has noticed the same problem and maybe fixed it ? (Not really bothering but not nice-looking) Varlin (talk) 10:52, 14 April 2012 (UTC)
- It seems to be related to this issue, but I can't manage to find the good hack ! Varlin (talk) 18:44, 30 December 2012 (UTC)
Works with 1.19 (modified) *Still Not Working*
A Q&D modifiction will make it work on 1.17 1.18 and 1.19, as long as the uploadstash (new since 1.16) wasn't affected.
change SpecialPurgeUserClass.php from
switch($versionMinor) { case 16: $purge = new MWPurge_1_16; break; default: return $this->getPOSTRedirectURL( false, wfMsg( 'uadm-unsupportedversionmsg', $abortError) ); }
into
switch($versionMinor) { case 16: case 17: // Possible problem with uploadstash table; ignored for now case 18: case 19: $purge = new MWPurge_1_16; break; default: return $this->getPOSTRedirectURL( false, wfMsg( 'uadm-unsupportedversionmsg', $abortError) ); }
The value for uadm-unsupportedversionmsg was missing from UserAdmin.i18n.php
Very useful extension to get rid of the myriads of spam-accounts, tnx! - Arent (talk) 20:00, 5 June 2012 (UTC)
- I have made the edit recommended above, but to no avail. Following is the result of Special:Version :
- Product Version
- MediaWiki 1.19.1
- PHP 5.3.13 (apache2handler)
- MySQL 5.1.49-log
- When I attempt to go to Special:AddUser, for example, I get the following:
- The website encountered an error while retrieving http://www.cookingtf.net/mediawiki/index.php/Special:AddUser. It may be down for maintenance or configured incorrectly.
- Here are some suggestions:
- Reload this webpage later.
- HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.
- The UserAdmin pages I'm having trouble with are as follows:
- Special:AddUser
- Special:EditUser
- Special:PurgeUser
- Special:UserAdmin
- My LocalSettings.php file is in the right location. My database connection is working just fine. FYI, it does not use localhost, but I have specified the host given by my site host. We are on a dedicated server.
- I'm not sure what I'm missing, but could certainly use some guidance.
- Thanks,
- Jeff 97.82.189.95 15:52, 6 July 2012 (UTC)
- hiya yes i have same problem any of the new added pages throws a
- the website cannot display the page
HTTP 500
Most likely causes:
- •The website is under maintenance.
- •The website has a programming error.
im on
- MediaWiki 1.19.1
- PHP 5.3.10
- MySQL 5.1.57
- any solution would be greatly welcomed :) 83.67.19.236 13:48, 17 July 2012 (UTC)
- I'm using MW 1.19.1, PHP 5.2.x and MySQL 5.1.x on all my mediawiki installations where I use UserAdmin. Not sure if that is preventing me from trouble. - Arent (talk) 08:42, 26 August 2012 (UTC)
- I tried to add this to a fresh 1.19.1 install, and when I went to "Add User" in the Special:Pages, I got this error:
- Fatal error: Call to private method User::loadGroups() from context 'SpecialUADMBase' in /home/myusername/public_html/wiki/extensions/UserAdmin/SpecialUADMBase.class.php on line 530
- Which references: $user->loadGroups();
- Any help? 98.231.240.203 19:21, 25 August 2012 (UTC)
- Having the same problem...
- SpecialUADMBase.class.php on line 530
- Fresh install of 1.19.1 64.1.215.2 22:44, 29 August 2012 (UTC)
- I'm very new to Mediawiki so excuse my possible dumb question.
- I am attempting to remove a group from a user. When I attempt to Save User I get a special page not found message. Also if I attempt to Find a user it returns me to the main page.
- For the first problem I see that it probably gets the return page from the getPOSTRedirectURL function but I am not good enough with php to figure out where it gets the parameters for that. 69.196.131.26 15:38, 16 October 2012 (UTC)
- I get the same message
- if there any solution??? 81.200.198.20 15:47, 20 July 2013 (UTC)
managing permissions
How would I go about making this Bureaucrat only? This is what I have so far, but it doesn't work :-(
LocalSettings.php
require_once( "$IP/extensions/UserAdmin/UserAdmin.php" ); $wgGroupPermissions['*' ]['UserAdmin'] = false; $wgGroupPermissions['user' ]['UserAdmin'] = false; $wgGroupPermissions['autoconfirmed']['UserAdmin'] = false; $wgGroupPermissions['bot' ]['UserAdmin'] = false; $wgGroupPermissions['Editor' ]['UserAdmin'] = false; $wgGroupPermissions['sysop' ]['UserAdmin'] = false; $wgGroupPermissions['bureaucrat' ]['UserAdmin'] = true;
-- Zaiger (talk) 02:44, 6 November 2012 (UTC)
- Try setting the other useradmin permissions to false too (AddUser, PurgeUser, EditUser) Jasper Deng (talk) 02:48, 6 November 2012 (UTC)
PurgeUser usernames not SQL escaped!
The purge user function does not sql escape usernames. This is a dangerous security hole! Dschwen (talk) 21:07, 3 January 2013 (UTC)
Seems to be working with 1.20.2
Although the formatting leaves a bit to be desired. I modified line 237 in SpecialUserAdminPanel.class.php
to change <table>
into <table border="1">
and it is a bit more readable now. TerryC 19:38, 31 January 2013 (UTC)
- Hi Terry,
- I'm also using 1.20.2. I'm only a few days old in using Media Wiki so I installed this extension. I see the options to Add User, Delete, etc...but I can't really add a user. When I click on Add a user, it goes onto a new page and shows "No Such Special Page: You have requested an invalid special page.". Am I missing something after I installed this extension?
- Any help is appreciated. Thank you! 75.72.177.47 01:30, 27 February 2013 (UTC)
- Hi Terry, can you please make a screenshot and upload here, as in the screenshot in the article looks like, it does not look at my wiki?! Hello IP 75.72.177.47, which version do you have installed on your wiki? Latest version is 0.5.0, maybe is your version older?!
- Kind regards, Sandro Abani79 (talk) 14:20, 27 February 2013 (UTC)
- Addendum: I must correct myself, version 0.9.0 is already available. Well my version is 0.5.0 and it works except for CSS quite well so far. Abani79 (talk) 14:23, 27 February 2013 (UTC)
- Hi Abani,
- Thanks for responding to my above post (75.72.177.47). I have downloaded only few days ago so I have the latest version 0.9.0. I can see all the new options installed with it. But however I can't create a new user. As I mentioned above when I click the 'Add a User' button, it goes to new page and tells me "No Such Special Page: You have requested an invalid special page.".
- Am I missing anything here? Do we need to do any configuration after we install the extention to get it all working?
- Appreciate your time. Thanks! Pandu Peddisetti (talk) 20:53, 27 February 2013 (UTC)
- Same issue.
- Running MediaWiki 1.20.2
- PHP 5.3.20 (cgi-fcgi)
- MySQL 5.1.67-community-log
- Wanted to try out UserAdmin so I could add my own users...
- Just downloaded. When I go to create a new user, after I hit "add user" button it states:
- No such special page
- Jump to: navigation, search
- You have requested an invalid special page.
- A list of valid special pages can be found at Special pages.
- Return to Main Page.
- ... And my user is not added.
- (
- when I look at useradmin.php I see that the comments states version .9 but the wgExtensionCredits states version .5
- line 18: * @version 0.9.0
- line 35: 'version' => '0.5.0', Technoshamman (talk) 14:37, 2 March 2013 (UTC)
- Same issue:
- After clicking "confirm purge" it takes me to this invalid url (? appears twice).
www.sdms.si/wiki/index.php?title=Posebno%3APurgeUser?returnto=Posebno%3AUserAdmin&statusmsg=Jmx0O3VhZG0tdW5zdXBwb3J0ZWR2ZXJzaW9ubXNnJmd0Ow%3D%3D&statusok=0&userids%5B0%5D=19
89.212.252.208 09:55, 21 March 2013 (UTC)
- Addendum: I must correct myself, version 0.9.0 is already available. Well my version is 0.5.0 and it works except for CSS quite well so far. Abani79 (talk) 14:23, 27 February 2013 (UTC)
- Are you using $wgUsePathInfo = false by chance?
- I get this error if it's set to false (which I had to do to fix another bug) but when I comment out this line it starts working again. 98.195.63.176 13:59, 19 July 2013 (UTC)
- Not working for me
- MediaWiki version: 1.20.2
- User Administration: (Version 0.5.0) (at least it what it says) although I know I downloaded 0.9
- Getting "No such special page" problem as well. Gustavormello (talk) 18:46, 15 April 2013 (UTC)
- Not working for 1.21.1 either, "no such special page" error. Pchestek (talk) 14:53, 22 June 2013 (UTC)
- To fix that change SpecialUADMBase.class.php about line 440 in function getURL($params) to replace '?' by '&',
- from:
$retvURL .= '?' . http_build_query($nonDefaultParams);
- to:
$retvURL .= '&' . http_build_query($nonDefaultParams);
Btechnix (talk) 21:59, 6 August 2013 (UTC)
- I tried that but I get;
- Bad title
- The requested page title was invalid, empty, or an incorrectly linked inter-language or inter-wiki title. It may contain one or more characters which cannot be used in titles.
- This goes for trying to purge either one or multiple users. MilkMiruku (talk) 14:30, 7 August 2013 (UTC)
- Not working for 1.21.1 either, "no such special page" error. Pchestek (talk) 14:53, 22 June 2013 (UTC)
includeJQuery
Fatal error: Call to undefined method OutputPage::includeJQuery() in /var/lib/mediawiki/extensions/UserAdmin/SpecialUserAdminPanel.class.php on line 212 Call Stack: 0.0004 356844 1. {main}() /usr/share/mediawiki/index.php:0 0.0767 7158852 2. MediaWiki->initialize(class Title, null, class OutputPage, class User, class WebRequest) /usr/share/mediawiki/index.php:116 0.0768 7158852 3. MediaWiki->initializeSpecialCases(class Title, class OutputPage, class WebRequest) /usr/share/mediawiki/includes/Wiki.php:59 0.0799 7500356 4. SpecialPage::executePath(class Title, ???) /usr/share/mediawiki/includes/Wiki.php:229 0.1200 10260568 5. SpecialUADMBase->execute(null) /usr/share/mediawiki/includes/SpecialPage.php:559 0.1532 12109772 6. SpecialUADMBase->executeGET(null) /var/lib/mediawiki/extensions/UserAdmin/SpecialUADMBase.class.php:88 0.1544 12119308 7. SpecialUserAdminPanel->doGET() /var/lib/mediawiki/extensions/UserAdmin/SpecialUADMBase.class.php:124 137.108.145.40 11:10, 5 March 2013 (UTC)
Working OK under 1.21alpha
with a few minor changes...
diff -r MediaWiki-Extension--UserAdmin/SpecialPurgeUser.class.php UserAdmin/SpecialPurgeUser.class.php 403a404 > case 21 : diff -r MediaWiki-Extension--UserAdmin/SpecialUADMBase.class.php UserAdmin/SpecialUADMBase.class.php 59c59 < wfLoadExtensionMessages('UserAdmin'); --- > // wfLoadExtensionMessages('UserAdmin'); Joe Corneli 23:10, 14 March 2013 (UTC)
- Hi ppl, i'd some experimenting with the layout of the table around, as it is easy to bare and cluttered effect, although the screenshot shows everything on the side of this extension to HTML style.
- Anyway, here is a screenshot of it, so in my case currently, the table (s) looks like. Unfortunately, only the top row will be displayed in a table instead of all, my knowledge of HTML are low, maybe someone know how you would get those blemishes with the table in the handle and would like to look at the code again?
- Update:
- The code snippet is very small, it can be found starting at line 237, but I did not trust myself to experiment further, you can if you like to try it and let us know what has been changed / should be.
- <syntaxhighlight lang='text'>Code:
</pre>Abani79 (talk) 14:01, 1 May 2013 (UTC)
- Just installed 1.21.1: I made this change but still getting the "requested invalid special page" error. Pchestek (talk) 14:53, 22 June 2013 (UTC)
No such special page
Product Version MediaWiki 1.20.3 PHP 5.3.21 (cgi-fcgi) MySQL 5.1.52-log +User Administration (Version 0.5.0) + required_once for UserAdmin.php in Localettings. By Submitting form (Edit/Add/Purge) -> "No such special page" Can anyone help ? Thanks. ClementLinz (talk) 09:10, 9 April 2013 (UTC)
No such special page
- Product Version
- MediaWiki 1.20.3
- PHP 5.3.21 (cgi-fcgi)
- MySQL 5.1.52-log
- +User Administration (Version 0.5.0)
- + required_once for UserAdmin.php in Localettings.
- By Submitting form (Edit/Add/Purge) -> "No such special page"
- Can anyone help ?
- Thanks. ClementLinz (talk) 09:10, 9 April 2013 (UTC)
- I'm having the same problem:
- When I go to
wiki/index.php?title=Special:UserAdmin
I see the first 25 users, and everything looks good. - But if I do any action that adds arguments to the URL, it doesn't work.
- For example going to
wiki/index.php?title=Special:UserAdmin?pagesize=50
says "You have requested an invalid special page." - MediaWiki version: 1.20.3
- User Administration version: 0.5.0 Smenci (talk) 14:34, 9 April 2013 (UTC)
- I get the same problem installed on an older wiki MediaWiki 1.16.5 Mark Weiser (talk) 22:06, 30 April 2013 (UTC)
- I'm having the same problem
- Product Version
- MediaWiki 1.19.0
- PHP 5.2.17 (cgi)
- MySQL 5.5.28-29.3-log 130.15.92.149 15:55, 2 May 2013 (UTC)
- To fix that change SpecialUADMBase.class.php about line 440 in function getURL($params) to replace '?' by '&',
- from:
$retvURL .= '?' . http_build_query($nonDefaultParams);
- to:
$retvURL .= '&' . http_build_query($nonDefaultParams);
Btechnix (talk) 21:58, 6 August 2013 (UTC)
- Yeah, it definitely seems like this is a main problem. If I manually change the ? to a & on pages that give the error it works fine, although you can't do that with some of the functions obviously.
- I tried your fix. Worked like a charm. Thanks! 76.118.31.113 02:21, 13 August 2013 (UTC)
- This fix worked fine for me, however, when editing an email address, I need to change back the & to a ? in order to get it to work. Maybe an if which checks if an ? or & is needed needs to be implemented somewhere along this code.. Sadly I don't have the time right now to experiment with this. I don't need to change things that often so changing the ? to an & or vice versa is not that much work, but it is not an ideal situation 130.255.16.114 09:03, 28 April 2014 (UTC)
- This fix worked perfect for me. However, editing users and changing passwords only works in Firefox(well not IE10 anyway).
- Cheers,
- Matt H 206.81.211.98 22:44, 6 May 2014 (UTC)
- Special:UserAdmin reads, "Fatal error: Call to undefined function wfLoadExtensionMessages() in /home/scratcha/public_html/extensions/UserAdmin/SpecialUADMBase.class.php on line 59" -Some guy 14:47, 20 August 2014 (UTC)
- According to:
- http://www.mediawiki.org/wiki/Project%3ASupport%20desk/Flow/2013/06#h-wfLoadExtensionMessages%28%29_removed_from_1.21.1%3F-2013-06-08T18%3A59%3A00.000Z
- The call to wfLoadExtensionMessages() can be removed. OlePedia (talk) 21:29, 29 September 2014 (UTC)
- Special:UserAdmin reads, "Fatal error: Call to undefined function wfLoadExtensionMessages() in /home/scratcha/public_html/extensions/UserAdmin/SpecialUADMBase.class.php on line 59" -Some guy 14:47, 20 August 2014 (UTC)
- Perform a check if ? exists. Made changes on line 440
- if (count($nonDefaultParams) > 0){
if (strpos($retvURL,'?')!==FALSE){
$retvURL .= '&' . http_build_query($nonDefaultParams);
}else{
$retvURL .= '?' . http_build_query($nonDefaultParams);
}
- } 146.1.1.1 18:13, 13 February 2015 (UTC)
- Hello,
- I have the same problem, but it doesn't work for me. It has also disabled Special:SpecialPages
- User Administration Version 0.5.0
- MediaWiki 1.22.6
- PHP 5.3.2-1ubuntu4.24 (apache2handler)
- MySQL 5.1.73-0ubuntu0.10.04.1
- Thanks for your help. Adelovieira (talk) 14:52, 4 June 2014 (UTC)
- at me to.
- it disabled all :-/ Special:Contributions/anaschtomagan 08:49, 8 January 2015 (UTC)
- Same here. I added this:
- require_once("$IP/extensions/UserAdmin/UserAdmin.php"); in LocalSettings.php
- to the end of the LocalSettings.php file, and lost the entire wiki. I needed to comment it out to get the wiki back again. I wonder where I am supposed to add the fix mentioned above by Btechnix...? Stoczko (talk) 07:48, 28 January 2015 (UTC)
- @Stoczo, you need to add only the following line at the end of your LocalSettings.php file
- require_once("$IP/extensions/UserAdmin/UserAdmin.php"); 83.246.9.107 14:48, 13 May 2015 (UTC)
- I'm having the same problem:
- We finally made it work for MW 1.26. These are the changes you need to make:
- 1- Mentioned earlier in this thread:
- Near line 440 in SpecialUADMBase.class.php change the if to look like
if (strpos($retvURL,'?')!==FALSE){
$retvURL .= '&' . http_build_query($nonDefaultParams);
}else{
$retvURL .= '?' . http_build_query($nonDefaultParams);
}
- 2- Function isValidEmailAddr has been deprecated versions ago, so you need to change that call in SpecialEditUser.class.php and SpecialAddUser.class.php.
- User::isValidEmailAddr( ... ) changes to:
- Sanitizer::validateEmail ( ... )
- and that's it. Lungpu (talk) 14:36, 5 April 2017 (UTC)
- Trying to get this to work with 1.28 mediawiki.. I get a generic server error when loading the UserAdmin and applying the above mentioned changes :(
- Anyone figured this out yet with the current stable version? 62.145.36.18 (talk) 15:39, 10 May 2017 (UTC)
Fatal error: Call to undefined function wfLoadExtensionMessages() in .../wiki/extensions/UserAdmin/SpecialUADMBase.class.php on line 59
Hello, I just installed the UserAdmin extension and when accessing the Special Pages of the wiki, I receive the above message. At line 59 of the page mentioned in the error I have: "wfLoadExtensionMessages('UserAdmin');" I would really appreciate any help. Thank you, Sevastian 78.96.65.139 07:27, 12 June 2013 (UTC)
- Details about the installation:
- MediaWiki Version : 1.21.1, 1.19.7
- PHP version: 5.3.23
- MySQL version: 5.1.69-cll 78.96.65.139 08:01, 12 June 2013 (UTC)
- Had the same problem with the upgrade; you have to comment out the call to wfLoadExtensionMessages as explained here: https://www.mediawiki.org/wiki/Project%3ASupport%20desk/Flow/2013/06#h-wfLoadExtensionMessages%28%29_removed_from_1.21.1%3F-2013-06-08T18%3A59%3A00.000Z
- But the UserAdmin still doesn't work; I'm getting the "No special page" error if I try to do anything. Pchestek (talk) 14:42, 22 June 2013 (UTC)
Using ? instead of & in URLs
Hi - Most pages do not work, because they incorrectly prepend their URL arguments with "?" instead of "&", e.g. http://www.liblfds.org/mediawiki/index.php?title=Special:UserAdmin?pagesize=100 Which has to be; http://www.liblfds.org/mediawiki/index.php?title=Special:UserAdmin&pagesize=100 (the character preceeding "pagesize=100" being different). 2.25.57.93 19:01, 16 June 2013 (UTC)
User Administration block and purge not working
Hi. I have; PHP 5.3.17 (cli) (built: Sep 17 2012 20:19:13) MediaWiki 1.18.2 PHP 5.3.17 (cgi-fcgi) PostgreSQL 9.2.1 When trying to mass purge, I see an unsupported version error (this is after correcting for the ?/& bug). When trying to mass block, the following URL is generated; http://www.liblfds.org/mediawiki/doPOST Which generates a 404. 2.25.57.93 19:04, 16 June 2013 (UTC)
Purge User not working
Going to purge user, I enter a username ("1t6a0t19942") and hit search. This takes me to the following URL; http://www.liblfds.org/mediawiki/index.php?username=1t6a0t19942 Which simply shows the root wiki page. Total fail. Third extension I've tried to obtain the capability to mass delete spam users, not a one of them works. 2.25.57.93 19:08, 16 June 2013 (UTC)
Bug in Filter function
Actually, the URL is:
http://domain.ext/wiki/index.php?filterby=User+Name&filterneg=0&filterop=0&filtertext=test
but it lacks the expression title like this:http://domain.ext/wiki/index.php?title=Spécial:UserAdmin&filterby=User+Name&filterneg=0&filterop=0&filtertext=test
With this last URL the function is fully operational, but I'm not enough PHP to fix it Btechnix (talk) 18:48, 7 August 2013 (UTC)@Add user, can not create any account except a type whose ID is started with a number
In my wiki, when adding user, first letter of ID must be a number(ex>8abcdef) or it can not create an account presenting the message "Invalid user name." This is very weird. I would like to add accounts being made up only alphabets. Please help me to find out the solution. Ggpid (talk) 05:16, 21 August 2013 (UTC)
- I get the same thing , just installed most recent version of mediawiki and useradmin and i get the same thing , only users that work are numeric ones. 86.127.194.67 08:27, 28 August 2013 (UTC)
- I seem to be having the same problem, though I didn't notice that adding a number to the front worked until I had visited this page. 149.149.135.104 18:04, 9 September 2013 (UTC)
- I just noticed from examining the .php code (specifically User.php -> isValidUserName) that the username is considered invalid if it starts with a lowercase letter (although evidentally starting with a number is fine). This is a MediaWiki restriction, not an UserAdmin extension specific thing.
- Specifically this function checks for (and considers the username invalid if found):
- the username is an IP address
- is an empty string (duh)
- contain slashes
- is longer than the maximum allowed username
- _doesn't begin with a capital letter_ (ding ding ding, though again numbers seem to be fine) 149.149.135.104 18:18, 9 September 2013 (UTC)
- I seem to be having the same problem, though I didn't notice that adding a number to the front worked until I had visited this page. 149.149.135.104 18:04, 9 September 2013 (UTC)
? for % fix not working for No such special page
Hello, I read some past posts on this page and found the fix that switches the ? for a & in the URL, but when applying that I get the following error: Fatal error: Wrong parameters for Exception([string $exception [, long $code ]]) in /ip/ois/www/admissions/wiki/extensions/UserAdmin/SpecialUADMBase.class.php on line 43 The URL being requested is: http://ois.indiana.edu/admissions/wiki/index.php?title=Special:AddUser&returnto=Special%3AUserAdmin The version I'm using is 1.19.7, in case that may be a factor. Any help would be greatly appreciated. 2001:18E8:2:1018:242E:9826:F0D5:9B9E 15:04, 28 August 2013 (UTC)
- This is the block of code at line 43:
- /*
* Exception class for throwing invalid PUT parameters
*/
- class InvalidPOSTParamException extends InvalidArgumentException {
public function __construct($message, $code = 0, Exception $previous = null)
{
parent::__construct($message, $code, $previous);
}
- }
- Specifically, the line that begins with "parent::" 2001:18E8:2:1018:242E:9826:F0D5:9B9E 15:14, 28 August 2013 (UTC)
- Got it! Read more posts and got to one that involved changing the code at line 43:
- parent::__construct($message, $code, $previous);
to
- parent::__construct($message, $code); 2001:18E8:2:1018:242E:9826:F0D5:9B9E 15:48, 28 August 2013 (UTC)
Error purging user who has contributions with apostrophe in the name
I am having trouble purging a user. When I hit the "confirm purge" button, I get the following:
- A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
- (SQL query hidden)
- from within function "". Database returned error "1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's_Swivel_concept.jpg','Brandon.jpg','CG1.jpg','Chair_01.JPG','Chair_Assembly.JPG' at line 1 (localhost)".
It seems to be due to an image this user uploaded with the filename "Brandon's_Swivel_concept.jpg" . It seems that mediawiki can handle the upload (probably by escaping the apostrophe in the SQL), but that UserAdmin can't. 149.149.135.105 16:41, 10 September 2013 (UTC)MW = 1.21.1 + UserAdmin : error and solution
According to mediawiki] from MW1.21.1 the function wfLoadExtensionMessages() is removed. (other interesting link https://www.mediawiki.org/wiki/Special:Code/MediaWiki/52503 ) Now, UserAdmin don't works and you have to edit extensions/UserAdmin/SpecialUADMBase.class.php and comment (with //) row 59 :
wfLoadExtensionMessages('UserAdmin');
and it works! kraba 08:23, 18 September 2013 (UTC)
<uadm-unsupportedversionmsg>
Process: - Select one or more users - Select Purge - Enter reason for purging and Confirm Purge Error in top of screen > <uadm-unsupportedversionmsg> MediaWiki 1.21.2 PHP 5.3.26 (litespeed) MySQL 5.5.32-31.0 Special:Version shows UserAdmin 0.5.0 even though I have downloaded 0.9.0 I was getting this error: Fatal error: Call to undefined function wfLoadExtensionMessages() in /clientdata/apache-www/a/c/actscoutaction.org.au/www/wiki/extensions/UserAdmin/SpecialUADMBase.class.php on line 59 So commented out:
- wfLoadExtensionMessages('UserAdmin');
Any help appreciated IvanSanders63 (talk) 08:43, 19 September 2013 (UTC)
- Tried wfLoadExtensionMessages('UserAdmin'); commented this line but still getting this message 125.18.106.145 07:28, 8 September 2014 (UTC)
Patch for MW 1.24.1 and external authentication
We've found a few problems with UserAdmin and MW 1.24.1:
- User::ValidEmailAddr() is gone, it's necessary to use Sanitizer::validateEmail() instead.
- wfLoadExtensionMessages() is no longer required.
The patch below for UserAdmin 0.9.1 fixes these problems and adds a configuration variable $wgUserAdminExternalAuth. If true, then UserAdmin basically disables all the password options. In our setup we use LDAP for authNZ and don't want local passwords. I haven't looked at submitting this to the UserAdmin author for consideration yet, but I post it here in case it's useful for anyone else.
--- README +++ README @@ -7,6 +7,9 @@ private wikis that require tighter contr Usage: require_once("$IP/extensions/UserAdmin/UserAdmin.php"); in LocalSettings.php +If $wgUserAdminExternalAuth is true, then password options are not used. It is +assumed that users are authenticated against an external authority such as LDAP. + Docs: http://www.mediawiki.org/wiki/Extension:UserAdmin Author: Lance Gatlin <lance.gatlin@gmail.com> Ap.Muthu <apmuthu@usa.net> License: http://opensource.org/licenses/gpl-3.0.html GNU Public License 3.0 --- SpecialAddUser.class.php +++ SpecialAddUser.class.php @@ -89,7 +89,7 @@ class SpecialAddUser extends SpecialUADM */ function doGET() { - global $wgLang, $wgOut, $wgUser, $wgAuth; + global $wgLang, $wgOut, $wgUser, $wgAuth, $wgUserAdminExternalAuth; $this->validateGETParams(); @@ -183,7 +183,7 @@ EOT; EOT; } - return <<<EOT + $previewHTML = <<<EOT <form id="adduserform" name="input" action="$postURL" method="post" class="visualClear"> <input type="hidden" name="edittoken" value="$editToken"/> <fieldset> @@ -207,6 +207,10 @@ $domainHTML <legend>$this->editgroupslabel</legend> $groupsHTML </fieldset> +EOT; + # Don't display the password stuff if we're externally authenticating. + if ( !$wgUserAdminExternalAuth ) { + $previewHTML .= <<<EOT <fieldset> <legend>$this->editpasswordlabel</legend> <input id="pwdmanual" type="radio" name="pwdaction" value="manual" $setPasswordChecked/> <label for="pwdmanual">$this->setpasswordforuserlabel</label><br/> @@ -223,11 +227,17 @@ $domainHTML <input id="pwdemailwelcome" type="radio" name="pwdaction" value="emailwelcome" $emailWelcomeChecked/> <label for="pwdemailwelcome">$this->emailwelcomelabel</label> <button type="submit" name="action" value="emailwelcomepreview">$this->previewactionlabel</button> (<a href="$welcomeTitleHref">$this->subjectlabel</a> | <a href="$welcomeTextHref">$this->bodylabel</a>)<br/> $previewWelcomeEmailHTML </fieldset> +EOT; + } + + $previewHTML .= <<<EOT + <button type="submit" name="action" value="adduser">$this->adduserlabel</button> </fieldset> </form> $returnToHTML EOT; + return $previewHTML; } /* @@ -235,7 +245,7 @@ EOT; */ function validatePOSTParams() { - global $wgUser, $wgAuth; + global $wgUser, $wgAuth, $wgUserAdminExternalAuth; // Validate FORM if(empty($this->username)) @@ -266,24 +276,26 @@ EOT; if(empty($this->email)) throw new InvalidPOSTParamException(wfMsg('uadm-fieldisrequiredmsg',$this->emailfield)); - if(!User::isValidEmailAddr($this->email)) + if(!Sanitizer::validateEmail($this->email)) throw new InvalidPOSTParamException(wfMsg('uadm-invalidemailmsg',$this->emailfield)); - if(empty($this->pwdaction)) - throw new InvalidPOSTParamException(wfMsg('uadm-formsubmissionerrormsg')); - - if($this->pwdaction == 'manual') - { - if(empty($this->password1) || empty($this->password2)) - throw new InvalidPOSTParamException(wfMsg('uadm-fieldisrequiredmsg',$this->passwordfield)); + # Ignore password bits if we're externally authenticating + if ( !$wgUserAdminExternalAuth ) { + if(empty($this->pwdaction)) + throw new InvalidPOSTParamException(wfMsg('uadm-formsubmissionerrormsg')); - if($this->password1 != $this->password2) - throw new InvalidPOSTParamException(wfMsg('uadm-passwordsmustmatchmsg')); - + if($this->pwdaction == 'manual') + { + if(empty($this->password1) || empty($this->password2)) + throw new InvalidPOSTParamException(wfMsg('uadm-fieldisrequiredmsg',$this->passwordfield)); + + if($this->password1 != $this->password2) + throw new InvalidPOSTParamException(wfMsg('uadm-passwordsmustmatchmsg')); + + } + elseif($this->pwdaction != 'email' && $this->pwdaction != 'emailwelcome') + throw new InvalidPOSTParamException(wfMsg('uadm-formsubmissionerrormsg')); } - elseif($this->pwdaction != 'email' && $this->pwdaction != 'emailwelcome') - throw new InvalidPOSTParamException(wfMsg('uadm-formsubmissionerrormsg')); - } @@ -294,7 +306,7 @@ EOT; */ function doPOST() { - global $wgUser, $wgAuth; + global $wgUser, $wgAuth, $wgUserAdminExternalAuth; switch($this->action) { @@ -328,29 +340,35 @@ EOT; $successWikiText = array(); $successWikiText[] = wfMsg('uadm-newusersuccessmsg', $this->username); - $userPassword = ''; - switch($this->pwdaction) - { - case 'manual' : - try { - $user->setPassword($this->password1); - $userPassword = $this->password1; - } - catch(PasswordError $pe) - { - return $this->getPOSTRedirectURL(false, wfMsg('uadm-passworderrormsg') . $pe->getText()); - } - $successWikiText[] = wfMsg('uadm-passwordchangesuccessmsg',$this->username); - break; - - case 'emailwelcome' : - $result = self::mailWelcomeAndPassword($user); - - if( WikiError::isError( $result ) ) - return $this->getPOSTRedirectURL( false, wfMsg( 'uadm-mailerror', $result->getMessage() ) ); - - $successWikiText[] = wfMsg('uadm-welcomeemailsuccessmsg', $this->username, $this->email); - break; + # Don't bother with password if we're authenticating externally + if ( !$wgUserAdminExternalAuth ) { + $userPassword = ''; + switch($this->pwdaction) + { + case 'manual' : + try { + $user->setPassword($this->password1); + $userPassword = $this->password1; + } + catch(PasswordError $pe) + { + return $this->getPOSTRedirectURL(false, wfMsg('uadm-passworderrormsg') . $pe->getText()); + } + $successWikiText[] = wfMsg('uadm-passwordchangesuccessmsg',$this->username); + break; + + case 'emailwelcome' : + $result = self::mailWelcomeAndPassword($user); + + if( WikiError::isError( $result ) ) + return $this->getPOSTRedirectURL( false, wfMsg( 'uadm-mailerror', $result->getMessage() ) ); + + $successWikiText[] = wfMsg('uadm-welcomeemailsuccessmsg', $this->username, $this->email); + break; + } + } else { + # Just set a dummy random password which will never be used + $userPassword = substr(str_shuffle(MD5(microtime())), 0, 10); } $user->setToken(); @@ -408,4 +426,4 @@ EOT; // user just added return $this->getSpecialPageURL('EditUser',$this->username, array('statusmsg' => base64_encode($successWikiText), 'statusok' => true, 'returnto' => $this->returnto)); } -} \ No newline at end of file +} --- SpecialEditUser.class.php +++ SpecialEditUser.class.php @@ -124,7 +124,7 @@ class SpecialEditUser extends SpecialUAD */ function doGET() { - global $wgLang, $wgOut, $wgUser, $wgAuth; + global $wgLang, $wgOut, $wgUser, $wgAuth, $wgUserAdminExternalAuth; $user = $this->validateGETParams(); @@ -316,7 +316,7 @@ EOT; EOT; } - return <<<EOT + $previewHTML = <<<EOT <form id="edituserform" name="input" action="$postURL" method="post" class="visualClear"> <input type="hidden" name="edittoken" value="$editToken"/> <fieldset> @@ -364,6 +364,9 @@ $domainHTML <legend>$this->editgroupslabel:</legend> $groupsHTML </fieldset> +EOT; + if ( !$wgUserAdminExternalAuth ) { + $previewHTML .= <<<EOT <fieldset> <legend>$this->editpasswordlabel:</legend> <input id="pwdmanual" type="radio" name="pwdaction" value="manual" $pwdSetPasswordChecked/> <label for="pwdmanual">$this->setpasswordforuserlabel:</label><br/> @@ -383,6 +386,9 @@ $domainHTML $previewWelcomeEmailHTML <input id="pwdnochange" type="radio" name="pwdaction" value="nochange" $pwdNoChangeChecked/> <label for="pwdnochange">$this->nochangetopasswordlabel</label><br/> </fieldset> +EOT; + } + $previewHTML .= <<<EOT <label for="reason">$this->reasonlabel:</label> <input id="reason" type="text" name="reason" size="60" maxlength="255" value="$this->reason"/> $this->requiredlabel<br/> <button type="submit" name="action" value="saveuser">$this->saveuserlabel</button> </fieldset> @@ -390,6 +396,7 @@ $domainHTML $searchFormHTML $returnToHTML EOT; + return $previewHTML; } /* @@ -397,7 +404,7 @@ EOT; */ function validatePOSTParams() { - global $wgUser, $wgAuth; + global $wgUser, $wgAuth, $wgUserAdminExternalAuth; $user = User::newFromId($this->userid); if(!$user->loadFromId()) @@ -436,26 +443,29 @@ EOT; if(empty($this->email)) throw new InvalidPOSTParamException(wfMsg('uadm-fieldisrequiredmsg',$this->emailfield)); - if(!User::isValidEmailAddr($this->email)) + if(!Sanitizer::validateEmail($this->email)) throw new InvalidPOSTParamException(wfMsg('uadm-invalidemailmsg',$this->emailfield)); if(empty($this->reason)) throw new InvalidPOSTParamException(wfMsg('uadm-fieldisrequiredmsg',$this->reasonfield)); - if(empty($this->pwdaction)) - throw new InvalidPOSTParamException(wfMsg('uadm-formsubmissionerrormsg')); - - if($this->action == 'saveuser' && $this->pwdaction == 'manual') - { - if(empty($this->password1) || empty($this->password2)) - throw new InvalidPOSTParamException(wfMsg('uadm-fieldisrequiredmsg',$this->passwordfield)); - - if($this->password1 != $this->password2) - throw new InvalidPOSTParamException(wfMsg('uadm-passwordsmustmatchmsg')); - -// $result = $user->checkPassword($this->password1); -// if($result !== true) -// throw new InvalidPOSTParamException(wfMsg('uadm-invalidpasswordmsg')); + # Ignore password information if we're authenticating externally + if ( !$wgUserAdminExternalAuth ) { + if(empty($this->pwdaction)) + throw new InvalidPOSTParamException(wfMsg('uadm-formsubmissionerrormsg')); + + if($this->action == 'saveuser' && $this->pwdaction == 'manual') + { + if(empty($this->password1) || empty($this->password2)) + throw new InvalidPOSTParamException(wfMsg('uadm-fieldisrequiredmsg',$this->passwordfield)); + + if($this->password1 != $this->password2) + throw new InvalidPOSTParamException(wfMsg('uadm-passwordsmustmatchmsg')); + + // $result = $user->checkPassword($this->password1); + // if($result !== true) + // throw new InvalidPOSTParamException(wfMsg('uadm-invalidpasswordmsg')); + } } return $user; @@ -646,4 +656,4 @@ EOT; return $this->getPOSTRedirectURL(true, $successWikiText); } -} \ No newline at end of file +} --- SpecialUADMBase.class.php +++ SpecialUADMBase.class.php @@ -56,8 +56,6 @@ abstract class SpecialUADMBase extends S { parent::__construct($name, $rights); - wfLoadExtensionMessages('UserAdmin'); - $this->mURL = $this->getTitle()->getLocalURL(); } @@ -603,4 +601,4 @@ EOT; EOT; } -} \ No newline at end of file +} --- UserAdmin.php +++ UserAdmin.php @@ -37,6 +37,9 @@ $wgExtensionCredits['specialpage'][] = a $dir = dirname(__FILE__) . '/'; +# wgUserAdminExternalAuth indicates that external auth is used (e.g. LDAP) instead of passwords. +$wgUserAdminExternalAuth = false; + $wgExtensionMessagesFiles['UserAdmin'] = $dir . 'UserAdmin.i18n.php'; $wgAutoloadClasses['SpecialUserAdminPanel'] = $dir . 'SpecialUserAdminPanel.class.php';
Liamgretton (talk) 15:22, 19 December 2014 (UTC)
Support for MW 1.25.1
Will this be updated for MW 1.25.1? If I use 0.9.1 I get a blank page for the special pages and if I use 0.5.0 I get the "No such special page" error. If I make the $retvURL .= '&' . http_build_query($nonDefaultParams); edit I get a blank page when I save an edit and the changes are not saved. If not, is there any other extension that let you manage user details. Andrew Branscom (talk) 03:09, 12 July 2015 (UTC)
undefined User:isValidEmailAddr
Are there some dependencies required for this? I get an "undefined" error with MW 1.25 76.20.240.14 (talk) 04:10, 11 February 2016 (UTC)
Changes for version 1.27
- In file "UserAdmin.php":
--- Uncomment lines 56 and 62 to enable "Specia:MassBlock" page
- In file "SpecialUserAdminPanel.class.php":
--- Change vfMsg() function to vfMessage()->plain() ..... Don't forget "->plain()" ant the end of function -- Comment line 215 "$wgOut->includeJQuery()" because funtion was deprecated
- In file SpecialAddUser.class.php":
-- Comment line 161 " #$template = new UsercreateTemplate;" -- Add "}" prior to the last one of the code
- In files "SpecialEditUser.class.php" and "SpecialPurgeUser.class.php":
--- Change vfMsg() function to vfMessage()->plain() This worked for me Fbruschetti (talk) 23:12, 29 July 2016 (UTC)
specialuseradminpanel::getTitle() error
Hello, I recently installed UserAdmin extension to my MediaWiki site but when I visit the Special:SpecialPages I am getting this error "/extensions/UserAdmin/SpecialUADMBase.class.php: Call to undefined method SpecialUserAdminPanel::getTitle()" can someone explain why it's happening? I am using MediaWiki 1.34.0 Thanks 42.106.192.26 (talk) 10:22, 22 November 2020 (UTC)