View Full Version : Unalterable Admins Can Edit Themselves
akanevsky
08-01-2005, 10:00 PM
I no longer support my hacks. Please feel free to update them and release new versions elsewhere as long as I get the credit for the original modification.
/*===================================*\
|| Unalterable Admins Can Edit Themselves
||
|| Author : Anton Kanevsky
|| Co-Author(s) : Andreas
|| Works on : vBulletin 3.5.x - 3.8.x
|| Released : Jan 31, 2009
||
|| Time required to install: 30 seconds
|| Difficulty: easy
\*===================================*/
DESCRIPTION
Allows unalterable administrators to modify their own accounts (with the exception of the password, usergroup and membergroups) via admincp.
STATISTICS
Products to Install: 1
VERSION HISTORY
1.0.5
[+] Ported to vBulletin 3.7.x - 3.8.x.
1.0.4
[+] The modification is now compatible with vBulletin 3.6.4 - a plugin code change was required due to changed format of CVS_REVISION constant.
[+] It is no more possible for an uneditable admin to modify the usergroup(s) he or she belongs to.
1.0.3
[+] The modification is now officially compatible with vBulletin 3.6.0 and above.
[+] The modification is now a product rather than a plugin, and it supports version check.
1.0.2
[+] Added restriction to prevent code from executing anywhere but within user.php.
[+] Added restriction to prevent alteration of password for unalterable administrators.
1.0.1
This is now a plugin instead of a code hack. Cheers to Andreas.
1.0.0
First Public Release
The installation manual is contained within the attached file.
IF YOU LIKE MY HACK, PLEASE CLICK INSTALL (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=203760)
Troak
08-02-2005, 08:46 PM
Thank you :)
tehste
08-02-2005, 08:48 PM
Nice idea. I hate the fact undeletable users can't be edited. Though I prefer just to have one super admin so it doesn't really matter for me.
Troak
08-02-2005, 09:05 PM
The code in the hack makes sense but for some reason doesn't work. I might have done something wrong though.
akanevsky
08-02-2005, 09:27 PM
Did you find and replace both instances?
Troak
08-02-2005, 09:28 PM
Yes, I still get this message
Sorry, this user is protected from being altered in the config.php file by the $config['SpecialUsers']['undeletableusers'] variable.
akanevsky
08-02-2005, 09:36 PM
Hmm.. Hold on, I'll take a look at what the problem might be...
Troak
08-02-2005, 09:50 PM
I can't figure out why it doesn't work =/
akanevsky
08-02-2005, 09:51 PM
Give me a minute please...
Troak
08-02-2005, 09:52 PM
Sure thing, I've just been going through the code to see if there was anything causing a problem, but I couldn't find anything, then again I don't know much about php.. lol
akanevsky
08-02-2005, 11:45 PM
Sorry for the delay, didn't have time to look.
I am uploading the fixed version. It is just a matter of an extra $ sign lol.
EDIT: A fixed and tested version uploaded. :)
EasyTarget
08-02-2005, 11:59 PM
great idea, thanks.
akanevsky
08-03-2005, 12:04 AM
You are welcome, but don't forget to click install -.- :)
Snake
08-03-2005, 08:06 AM
Cute hack, thanks. ^_^
Troak
08-03-2005, 12:33 PM
Yay works fine now ^^
Thanks a ton!
Andreas
08-04-2005, 10:07 AM
Nice Code Hack.
How about a Plugin? ;)
Hook: admin_global
if ($_POST['do'] != 'kill')
{
$noalter = array_flip(explode(',', $vbulletin->config['SpecialUsers']['undeletableusers']));
unset($noalter[$vbulletin->userinfo['userid']]);
$vbulletin->config['SpecialUsers']['undeletableusers'] = implode(',', array_flip($noalter));
}
Snake
08-04-2005, 11:33 AM
That's much better as a plugin so thankies!!
akanevsky
08-04-2005, 11:43 AM
Nice Code Hack.
How about a Plugin?
Thanks. I did not know about the array_flip function :)
I will set it up as a plugin.
akanevsky
08-04-2005, 11:57 AM
Done, converted to a plugin.
Except in mine, it's $_POST['do'] == 'update'
Snake
08-04-2005, 12:23 PM
Well what's the difference? :P
akanevsky
08-04-2005, 12:57 PM
The difference is, in Kirby's version you could delete the admin (but not edit him). In mine, you can edit, but not delete.
akanevsky
08-04-2005, 12:58 PM
Mod, move it to plugins please thanks.
IceBurn3000
08-04-2005, 01:06 PM
Awesome plugin!
*Clicks install
It was a real pain having to edit the config file to modify my settings! Not any more!
Sovereign
08-04-2005, 03:48 PM
Thank you! I couldn't edit myself (I set myself as unalterable for security reasons) and had to keep FTPing new config.phps every time I changed something...
Andreas
08-04-2005, 07:48 PM
The difference is, in Kirby's version you could delete the admin (but not edit him). In mine, you can edit, but not delete.
Erm ... I check for do != 'kill', you checked for do == 'update'
As those are the only actions in user.php that check undeletableusers it should be the same?
akanevsky
08-04-2005, 08:15 PM
Erm ... I check for do != 'kill', you checked for do == 'update'
As those are the only actions in user.php that check undeletableusers it should be the same?
Oh. Sorry. I read it as do=='kill'... lol. Yeah, it would do the same, but I prefer a specific action, rather than any exclusive actions if you know what I mean. :)
Andreas
08-04-2005, 08:22 PM
Yeah, I didn't want to check for update as this is used by almost all Scripts.
Maybe
if ($_POST['do'] == 'update' AND basename($vbulletin->scriptpath) == 'user.php')
{
stuff
}
Then it would really be disabled just for this action.
akanevsky
08-04-2005, 08:46 PM
Then it would really be disabled just for this action.
Actually, only user.php does any changes to user accounts. So it would be pointless to check for the script as well, wouldn't it?
Andreas
08-04-2005, 08:49 PM
I was too lazy to check other Scripts ^.^
If it's only being used in this one, great.
BlackRabbit1971
08-05-2005, 11:49 PM
Getting a "Invalid File Specified" on trying to import :(
akanevsky
08-06-2005, 11:45 AM
Then specify a valid file :)
Thankyouthankyouthankyou! THANK YOU!
*Click install*
EDIT: -_-
It doesn't work on RC2. Drat.
Or I've done something stupid.
akanevsky
08-07-2005, 12:50 PM
It's for RC1... Didn't test on RC2.
Snake
08-07-2005, 03:47 PM
I'm running on RC2 and it works fine. ;)
BlackRabbit1971
08-07-2005, 07:01 PM
Then specify a valid file :)
And just exactly where would I find a valid file.... I downloaded it from here... ???
akanevsky
08-08-2005, 02:07 AM
I downloaded it from here... ???
That would be the valid file that you have to specify in your admincp :)
I'm running on RC2 and it works fine. ;)Odd. It isn't working for me. =/
BlackRabbit1971
08-08-2005, 11:00 AM
That would be the valid file that you have to specify in your admincp :)
Ok... this is getting silly....
This what I do...
1. Download you zip and unzip it...
2. In the Plugin System/Manage Products I click [Add/Import Product]
3. I then click BROWSE and point the file selection box to your "plg_uacet.xml" file.
4. I click Import.
The screen changes to the "Importing Product, Please Wait..." page. I then get 2 sets of dots "[::]" and an error box... "Invalid File Specified" and a "Go Back" button...
So, you tell me what I'm doing wrong??
akanevsky
08-08-2005, 11:25 AM
Try removing the text from the textbox that allows you to upload a file from the server.
BlackRabbit1971
08-08-2005, 12:59 PM
Try removing the text from the textbox that allows you to upload a file from the server.
Nope.. same thing... I've even tried uping directly to the server and using that damn box ya telling me empty.. :(
I would so like to use this plugin... :(
BR :(
I tried it again on RC2. Still didn't work. =/
akanevsky
08-08-2005, 11:25 PM
I suppose RC1 plugins are incompatible with RC2.
Boofo
08-08-2005, 11:28 PM
They seem to be working fine between versions with all the other one I've seen. ;)
Maybe they need to un-install and re-install? ;)
Daniel
10-03-2005, 07:42 PM
Thanks a bunch!
akanevsky
10-03-2005, 08:30 PM
You're welcome.
dsotmoon
10-03-2005, 08:43 PM
is this working in gold?
akanevsky
10-03-2005, 09:08 PM
Yes.
dsotmoon
10-03-2005, 10:04 PM
Yes.
installed, thank you
akanevsky
10-03-2005, 10:32 PM
No problem ;) 45 installs in one day. Wow.
secret1980
10-09-2005, 05:24 AM
i dont get how to install this .. can some one help me ??
In Hook Location I dont have anything called as admin_global :s
& should i copy even this : <?xml version="1.0" encoding="ISO-8859-1" ?> ???
akanevsky
10-09-2005, 11:28 AM
You just need to import the plugin using your plugin manager...
Quillz
10-09-2005, 04:28 PM
Just installed this very useful hack! Since my admin account is unalterable and undeletable, it's nice to not have to edit config.php anytime I want to change my account info!
akanevsky
10-09-2005, 06:19 PM
Just a reminder - this hack goes against vBulletin's security measures, because unalterability was made in order for hackers to be unable to edit your account (in case they gain access). So install this only if you are not afraid of it.
Maybe in next version I'll make it so that you cannot change usergroup of the person if he is undeletable. :) Then it will be compeltely secure.
akanevsky
11-04-2005, 10:17 PM
1.0.2
[+] Added restriction to code execution in user.php only.
[+] Added restriction to password alteration.
EasyTarget
11-04-2005, 11:00 PM
nice job.
akanevsky
11-04-2005, 11:01 PM
Thanks :)
Snake
11-05-2005, 04:30 PM
Wooho. Thanks.
akanevsky
11-19-2005, 02:43 PM
You might want to use vBulletin to import the plugin from a file for you.
PLUGIN SYSTEM --> DOWNLOAD/UPLOAD PLUGINS
Iceburg22
11-21-2005, 12:57 PM
Installed. Thanks
Calisse
12-05-2005, 11:36 PM
works perfectly and nice and easy for dopes like me. lol. cheers, was looking for a way to do this (damn kids on the admin cpanel want to change their rep making me work grumble grumble mutter)
Telegon80
12-10-2005, 10:52 PM
edit: nm works good
Talisman
12-11-2005, 07:22 PM
I'm getting a strange error, but have no idea why. I installed the plug-in and that went through just fine. But when I try to access my ACP, I get a parse error from global.php.
Parse error: parse error, unexpected '<' in /......../forum/admincp/global.php(194) : eval()'d code on line 1
Locking myself out of my own ACP isn't quite the result I was going for, especially since that's where I'd have to go now to un-install this plugin ... lol. So I commented out the hook instruction in admin/global.php Line 194. And that let me access the ACP again.
So here's the code from that line. Does anyone see why I'd get a parse error from this? And is this the correct syntax to be installed by the xml file?
($hook = vBulletinHook::fetch_hook('admin_global')) ? eval($hook) : false;
seems not workin on 3.5.2
akanevsky
12-20-2005, 05:45 PM
seems not workin on 3.5.2
Really? I'll check.
da prez
12-27-2005, 06:39 AM
Psionic this hack interferes with the ability to add users through admincp, do you have any idea why ?
when adding a user, i get invalid password specified error.
i am guessing it is the password thing for admins.
it is not huge deal as i can turn it off, but if it could be fixed that would be kickass.
akanevsky
12-27-2005, 11:49 AM
Psionic this hack interferes with the ability to add users through admincp
Are you sure that it is my hack?
norwichcanary
12-27-2005, 01:06 PM
Are you sure that it is my hack?
I can confirm I had the same issue and uninstalled the mod. It would not let me edit any user passwords.
akanevsky
12-27-2005, 01:47 PM
Ah. It was supposed to restrict password alteration for unalterable administrators, but apparently it does so for everyone. FIXED!
Telegon80
12-27-2005, 02:01 PM
ah so this is the reason why i couldnt add new users lmfao... damn, so this is fixed? ill go ahead and re-install... :D
akanevsky
12-27-2005, 02:05 PM
Yes. I couldn't understand why I couldn't add new users either lol... :p Now it only disables (or is supposed to disable) the password alteration when an unalterable admin is editing himself. ;P
da prez
12-27-2005, 03:45 PM
thank you much
Really? I'll check.
yeah
still w8in .. :)
akanevsky
12-30-2005, 11:02 AM
I thought I just released an update. ;)
>> Last Update: 27. Dec 2005
EasyTarget
12-30-2005, 07:16 PM
thanks for the update.
nize ;) thanks mate keep on
[+] Added restriction to code execution in user.php only.
is it possible to use this with Quick (inline) User Editor (https://vborg.vbsupport.ru/showthread.php?t=102789) ?
darkman
01-24-2006, 03:06 AM
Thank you :)
*installed
theFAILURE
01-24-2006, 03:46 AM
Nice job, works tip-top!
Guest210212002
01-24-2006, 03:59 PM
/me clicks install
Mindwarp
02-14-2006, 01:29 PM
dosn't seam to work on 3.5.3 :(
Snake
02-14-2006, 01:30 PM
Works just fine here. :)
kizzmet
03-08-2006, 01:48 PM
Installed and works great. Thank you for this.
Only thing I would request is to actually put the instructions in the plug in manual rather then sending your users to look something up in the VB manual. We are not all tech geeks (meant as a compliment) and I searched for the intructions in the manual using the search function to no avail. I did figure it out though, but it would have been nice just to have the instructions rather then going around looking for them.
Thanks =)
cynix2
08-09-2006, 09:37 PM
has anyone tested this on 3.6?
Zelda-King
08-09-2006, 11:29 PM
I haven't received any errors updating myself on 3.6.
akanevsky
08-10-2006, 02:19 AM
This hack is so simple that it should work fine on 3.6.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.