Customizing SMF > Tips and Tricks

Disable deletion of yourself

<< < (4/16) > >>

Metal_GunBlade:
Dude, I have SMF 1.1 Beta 3 but I can't find the code...
Is there something I'm missing???

[Unknown]:
It's in Subs-Members.php.

-[Unknown]

rojamaia:

how about if i want to protect two or more accounts?

can i just add comma to the number like
--- Code: ---if ($users == 1,2 xor in_array(1,2 $users) )
--- End code ---


by the way, which one of the two codes would work for 1.0.5?  could you please label those codes with the versions that it would work with?

thank you!  :D

[Unknown]:
No, you can't just add commas like that.  Instead:

if ($users == 1 or $users == 2 or @in_array(1, $users) or @in_array(2, $users))

Would probably be best.

-[Unknown]

rojamaia:
so if it's three users, i just add more "or"s?


something like this?

--- Code: ---if ($users == 1 or $users == 2 or $users == 36 or @in_array(1, $users) or @in_array(2, $users) or @in_array(3, $users))
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version