Customizing SMF > Tips and Tricks
Disable deletion of yourself
Sol:
As soon as possible please :P
azuregenesis:
working fix for 1.03 (tested) just quoted TauOnline and edited it :)
find in Sources/ManageMembers.php
--- Code: ---function deleteMembers($users)
{
global $db_prefix, $sourcedir, $modSettings, $ID_MEMBER;
--- End code ---
In Sources/ManageMembers.php
and replace it with:
--- Code: ---function deleteMembers($users)
{
global $db_prefix, $sourcedir, $modSettings, $ID_MEMBER;
// Protect the person who started the forum
if ($users == 1)
{
fatal_error('You\'re not allowed to delete the administrator.');
exit();
}
--- End code ---
This stops people from deleting your account either through your profile, or through the view/delete members page in the admin panel.
If you're ID isn't 1, but you still want to protect yourself, then just change the number.
Jako:
Am I the only one that's scared to test this mod out? >>
Tristan Perry:
I've updated my first post so this now works with updated versions (Tested with 1.1 Beta 3 and 1.0.5)
Credit goes to [Unknown] for this update, he posted an updated/working version of this hack in one of the threads in the Announcements board.
--- Quote from: Jako on June 26, 2005, 04:59:20 AM ---Am I the only one that's scared to test this mod out? >>
--- End quote ---
:P I was at first. Either backup your database or run SMF on a test server.. It should work though.
azuregenesis:
--- Quote from: Jako on June 26, 2005, 04:59:20 AM ---Am I the only one that's scared to test this mod out? >>
--- End quote ---
you can do what TAU said above or you can also change the user number in the code above. :)
instead of "1" (whcih is the admin) change it to another one, like a member that you're about to remove.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version