Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Delete User Lock Yabb 2.3 (Read 9524 times)
Gizmoy
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 7
Joined: May 31st, 2008
Delete User Lock Yabb 2.3
Oct 17th, 2008 at 5:51pm
Print Post  
--------------------------
Delete User Lock Yabb 2.3
--------------------------


Thank All Yabb developers for another wonderful release of Yabb 2.3, With Awesome and wonderful feature.

Delete User Lock Yabb 2.3

Feature:

This is Very Simple Mod But very important Which Prevent Users To Delete their account from forum.

By default users (forum registered members) can delete themself from user profile option.

This Mod allow only Admin to delete user profile , users can not delete themself/

usefull if forum have lesser amount of members and if Admin dont want to allow user to delete themself.

Mod History:

Nothing changed from previous version released for Yabb 2.2.X


Screenshot reference : (The mod will remove pointed option from snap )




Manual Modification:

Open Sources/profile.pl  

Search for :

Code
Select All
if(($iamadmin && ($username ne $user)) || ($username ne "admin")) 



Replace it with :

Code
Select All
if($iamadmin) 



All done Simple and Easy Save members  Roll Eyes

Thanks all yabb developers for wondeful forum.


Gizmoya



  

Delete-Lock_Yabb_2.3.zip ( 0 KB | Downloads )
Back to top
 
IP Logged
 
batchman
Global Moderator
*****
Offline


What's up?!

Posts: 1280
Location: Orlando
Joined: Apr 28th, 2002
Gender: Male
Re: Delete User Lock 2.3
Reply #1 - Oct 17th, 2008 at 6:21pm
Print Post  
So if i understand this correctly, you can either use the mod file, or do the quick edit listed above?

Just making sure I understand.
  

Improving my forum, one mod at a time!


Now up and running again, with an accurate link.


Back to top
WWW  
IP Logged
 
Gizmoy
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 7
Joined: May 31st, 2008
Re: Delete User Lock 2.3
Reply #2 - Oct 17th, 2008 at 6:23pm
Print Post  
batchman wrote on Oct 17th, 2008 at 6:21pm:
So if i understand this correctly, you can either use the mod file, or do the quick edit listed above?

Just making sure I understand.



Yeap you got it correct , you can either download the attached file and apply via boardmod or else simply apply the steps written

.


  
Back to top
 
IP Logged
 
deti
Full Member
***
Offline


YaBB is the best!!!

Posts: 101
Location: Prien am Chiemsee
Joined: Mar 13th, 2008
Re: Delete User Lock Yabb 2.3
Reply #3 - Oct 17th, 2008 at 10:58pm
Print Post  
Gizmoy,

be careful with this code! With your change the admin is able to delete himself, or at least does see the button to delete himself! This can cause big problems!

Better you change to

Code
Select All
if ($iamadmin && $username ne $user)  



Regards

deti (YaBB Development)
  

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
Johann Wolfgang Goethe
Back to top
 
IP Logged
 
batchman
Global Moderator
*****
Offline


What's up?!

Posts: 1280
Location: Orlando
Joined: Apr 28th, 2002
Gender: Male
Re: Delete User Lock Yabb 2.3
Reply #4 - Oct 17th, 2008 at 11:51pm
Print Post  
Hey! I'm the administrator of this forum! (Well, not this one, but you know what I mean.) I have the right to delete myself if I want to!
  

Improving my forum, one mod at a time!


Now up and running again, with an accurate link.


Back to top
WWW  
IP Logged
 
Gizmoy
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 7
Joined: May 31st, 2008
Re: Delete User Lock Yabb 2.3
Reply #5 - Oct 18th, 2008 at 6:28pm
Print Post  
deti wrote on Oct 17th, 2008 at 10:58pm:
Gizmoy,

be careful with this code! With your change the admin is able to delete himself, or at least does see the button to delete himself! This can cause big problems!

Better you change to

Code
Select All
if ($iamadmin && $username ne $user)  



Regards

deti (YaBB Development)




batchman wrote on Oct 17th, 2008 at 11:51pm:
Hey! I'm the administrator of this forum! (Well, not this one, but you know what I mean.) I have the right to delete myself if I want to!




Yeas By Applying This mod , ONLY ADMIN can have right to delete his own account and others , not all users.

And Let me know what exactly you all want, i mean its beta mod and if all think that Admin should also not see delete option for his profile , then their has to be little change and thats all.

By the way this mod was only for general registered members except Admin, So if u are Admin you wont never delete yourself but other members might delete their profile which can be stopped  by this mod.


Gizmoya
  
Back to top
 
IP Logged
 
mick
Senior Member
****
Offline


I love YaBB

Posts: 345
Location: Dorsten
Joined: Nov 29th, 2005
Gender: Male
Re: Delete User Lock Yabb 2.3
Reply #6 - Jan 5th, 2009 at 9:15pm
Print Post  
Hi,

can someone tell me, what code I have to change, for
using it, with 2.3.1?

Thx in advance.
Mick
  
Back to top
WWW  
IP Logged
 
ThM
God Member
*****
Offline



Posts: 585
Location: Germany, Nds.
Joined: May 21st, 2006
Gender: Male
Re: Delete User Lock Yabb 2.3
Reply #7 - Jan 5th, 2009 at 9:51pm
Print Post  
Try this ....

....search in Profile.pl

Code
Select All
	if (($iamadmin && ($username ne $user)) || ($username ne "admin")) { 



and replace it with this .....

Code
Select All
if($iamadmin) { 



Without a guarantee and not tested.
  

Greeting ThM
Back to top
 
IP Logged
 
batchman
Global Moderator
*****
Offline


What's up?!

Posts: 1280
Location: Orlando
Joined: Apr 28th, 2002
Gender: Male
Re: Delete User Lock Yabb 2.3
Reply #8 - Jan 5th, 2009 at 10:26pm
Print Post  
Yes, it is just some minor spacing issues with the line.

The original code did not have a space between the if and the ((, and also had more space at the end of the line before the ;.

Annoyingly simple correction to make it work.
  

Improving my forum, one mod at a time!


Now up and running again, with an accurate link.


Back to top
WWW  
IP Logged
 
mick
Senior Member
****
Offline


I love YaBB

Posts: 345
Location: Dorsten
Joined: Nov 29th, 2005
Gender: Male
Re: Delete User Lock Yabb 2.3
Reply #9 - Jan 5th, 2009 at 10:48pm
Print Post  
Ok. Thank you. I change the code, tested it. I as Admin can
delete, they can't delete themself.
  
Back to top
WWW  
IP Logged
 
Derek Bullock
Full Member
***
Offline


I love Camp Oven Cooking

Posts: 184
Location: Brisbane
Joined: Nov 9th, 2007
Gender: Male
Re: Delete User Lock Yabb 2.3
Reply #10 - Feb 21st, 2009 at 8:24am
Print Post  
Installed today.  Good Mod.  Saves the Ex-member appearing.  Wink
  

Back to top
WWW  
IP Logged
 
Martin_W
Senior Member
****
Offline


I love YaBB 1G - SP1.2!

Posts: 463
Location: Devon
Joined: Jun 22nd, 2005
Gender: Male
Re: Delete User Lock Yabb 2.3
Reply #11 - Oct 1st, 2010 at 1:52pm
Print Post  
I have implemented the same type of thing on my forum with a simple additional line.

I still have the delete user button on show, but when clicked a check is made to make sure the user who clicked the button is an administrator.  If they are not they recieve a message "You cannot delete your own account, please contact an administrator".

Admins can delete any account.

The admin account cannot be deleted.

In Profile.pl,


SEARCH FOR:
Code
Select All
} elsif ($member{'moda'} eq $profile_txt{'89'}) {
  &fatal_error("cannot_kill_admin") if ($member{'username'} eq 'admin');
 




REPLACE:
Code
Select All
} elsif ($member{'moda'} eq $profile_txt{'89'}) {
  &fatal_error("error_occured", "You cannot delete your own account.<p>Please contact an Administrator if you wish to have your account deleted.") if (!$iamadmin);
  &fatal_error("cannot_kill_admin") if ($member{'username'} eq 'admin'); 




The language is hard coded.

Hope someone finds this useful.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint