Disable deletion of yourself

Started by Tristan Perry, September 11, 2004, 09:56:11 AM

Previous topic - Next topic

ShadowStriker

Im member #1, but I have a spy that I use on the forum and act like a regular member, just to see ways people act and stuff. How would I make both undeleteable?

Thurnok

#41
[EDIT]

Removed all the code from here.  I have packaged this as a mod now and should be available shortly (once approved) here at SMF as "Admin Deletion Protect" mod.

In the interim, if you want this right away, you can find it at my TP Blocks [nofollow] site available for download.  Downloading requires registration however.
To climb a rock, you must first move your feet!
~ Thurnok


Visit my TinyPortal Blocks site for more of my blocks - Thurnok's TP Blocks [nofollow]

Stuart

Quote from: Stuart on July 08, 2006, 08:17:53 PM
This works great, thanks!

It's no longer working with SMF 1.1.1 though  :'(

Shadow Queen

I can't found the code what i am looking for in the file.  I am running with 1.1.1 with TP.

Yellowrose

I would also like to make use of this code edit.

SMF 1.1.2 w/Tiny Portal 0.9.7.1

Skipdawg

Yes would be nice to have this updated for 1.1.2  ;)
Would be nicer to have this as a fixed option of enable or disabled in SMF Admin panel  ;D
Skipdawg's Community

Powered by SMF 1.1.3

Thurnok

#46
I updated the hack.  You can find a working version, including the fix for the Profile page to prevent removing from the Admin group, at my TP Blocks site [nofollow].  The post is located here [nofollow] and is accessable to guests as well.
To climb a rock, you must first move your feet!
~ Thurnok


Visit my TinyPortal Blocks site for more of my blocks - Thurnok's TP Blocks [nofollow]

DrDom

#47
Quote from: Thurnok on April 29, 2007, 07:41:22 AM
I updated the hack.  You can find a working version, including the fix for the Profile page to prevent removing from the Admin group, at my TP Blocks site.  The post is located here and is accessable to guests as well.

It appears that guest access is not available, when I clicked the link it presents me with a registration box. :(

Thurnok

Sorry, caught me in the middle of moving my site as well.  Try going to the new site (updated in my original post) and you should now be able to access it.
To climb a rock, you must first move your feet!
~ Thurnok


Visit my TinyPortal Blocks site for more of my blocks - Thurnok's TP Blocks [nofollow]

DrDom

Quote from: Thurnok on April 30, 2007, 10:06:17 PM
Sorry, caught me in the middle of moving my site as well.  Try going to the new site (updated in my original post) and you should now be able to access it.
hi,
I noticed that the site was under maintenance later last night, thanks for the reply, i'll try again now.

Regards

Thurnok

I've packaged this up as a Mod and it has now been submitted to SMF, just waiting approval.
To climb a rock, you must first move your feet!
~ Thurnok


Visit my TinyPortal Blocks site for more of my blocks - Thurnok's TP Blocks [nofollow]

DrDom

I applied the mods from your site on may 1st, it works very well indeed.
But pleased to see you have made a package.

Regards

Bulakbol

Quote from: Thurnok on May 05, 2007, 05:47:43 PM
I've packaged this up as a Mod and it has now been submitted to SMF, just waiting approval.

Is this mod not available for downloading yet?  It will be nice if it will work with SMF 1.1.3   ;)
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Bulakbol

Ok, tested with SMF 1.1.3 and it works. It won't delete user #5 and #6. Then I deleted #9 and it deleted it.  Thank you.


// Protect the person who started the forum

if ($users == 5 or $users == 6 or @in_array(5, $users) or @in_array(6, $users))
     fatal_error('You\'re not allowed to delete the administrator.');
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

chrishicks


SleePy

The same method JohnyB has posted above would work for 1.1.4.
You will find little differences between 1.1.3 and 1.1.4 as once we released the 1.1 line it was only bug patches and security fixes we are doing :)
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

theboogymaster


MisticJeff

Anyone have any further info on this working with 1.1 RC3??  I tried inserting the code into Subs-Members.php and then tried deleting the named admin and it allowed me to...

Stuart


Tristan Perry

I've updated my first post to reflect JohnyB's suggested code change :)

Advertisement: