[2.0.21] Delete User MOD

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
31
76%
Very Good
5
12%
Good
2
5%
Fair
2
5%
Poor
1
2%
 
Total votes: 41

jerryT
Registered User
Posts: 278
Joined: Fri Feb 25, 2005 12:04 pm

Post by jerryT » Mon Nov 27, 2006 9:09 pm

Does this MOD or can this MOD delete the user and their posts ??

Thanks

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 » Tue Nov 28, 2006 12:21 am

jerryT wrote: Does this MOD or can this MOD delete the user and their posts ??

Same as phpBB, this MOD does not delete user's posts.

~Mac

User avatar
DarkKnight33
Registered User
Posts: 32
Joined: Wed Mar 10, 2004 7:07 am

Post by DarkKnight33 » Mon Dec 04, 2006 5:48 am

Twitcheh wrote: Great mod, man. But one thing, I didn't install this to SubSilver, but to Solaris.

Whenever I go to delete someone, I get no text in the box.

www.fbhclan.com/images/error.jpg

Is there any way to fix that?


You didn't do the final step: :wink:

Code: Select all

#-----[ OPEN ]------------------------------------------ 
#
language/lang_english/lang_main.php
# 
#-----[ FIND ]------------------------------------------ 
#
?>
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
// Delete User MOD
$lang['Delete_user'] = 'Delete user: %s';
$lang['Confirm_delete_user'] = 'Are you sure you want to delete user: %s';
$lang['User_deleted'] = 'User was successfully deleted';
$lang['Click_return_memberlist'] = 'Click %sHere%s to return to memberlist';
$lang['Cannot_delete_self'] = 'Cannot delete yourself';
# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
Addtionally, I did my install a little different such that on the memberlist it adds another column next to the user. I think this looks 100x cleaner, and makes it easier to delete the users. :)

Twitcheh
Registered User
Posts: 4
Joined: Fri Nov 10, 2006 3:43 am

Post by Twitcheh » Fri Dec 08, 2006 1:28 am

Wow... I could've SWORE I added it, but I just looked. I didn't..

Thanks for the help, Knight. :)

EDIT: How do you add the column? (Is a Novice PHP user).

matty_292
Registered User
Posts: 1
Joined: Tue Dec 12, 2006 3:59 pm

Post by matty_292 » Tue Dec 12, 2006 4:01 pm

ycl6 wrote: Ah, sorry, my MOD doesn't require any SQL execution. SESSIONS_KEYS_TABLE is s standard phpBB table :wink:

Check your constants.php

You should have this:

Code: Select all

define('SESSIONS_KEYS_TABLE', $table_prefix.'sessions_keys');
From phpBB standard package, mysql_schema.sql, you should see:

Code: Select all

# --------------------------------------------------------
#
# Table structure for table `phpbb_sessions_keys`
#
CREATE TABLE phpbb_sessions_keys (
  key_id varchar(32) DEFAULT '0' NOT NULL,
  user_id mediumint(8) DEFAULT '0' NOT NULL,
  last_ip varchar(8) DEFAULT '0' NOT NULL,
  last_login int(11) DEFAULT '0' NOT NULL,
  PRIMARY KEY (key_id, user_id),
  KEY last_login (last_login)
);
~Mac


I have checked and double checked those steps, still the same error.

Anything else that could be wrong?

angelp1ay
Registered User
Posts: 175
Joined: Tue Dec 23, 2003 1:32 pm
Location: Bristol, UK
Contact:

Post by angelp1ay » Tue Dec 12, 2006 8:01 pm

Looks great - should take the pain out of removing those spammers!

Straight on my mod install list!

angelp1ay
Registered User
Posts: 175
Joined: Tue Dec 23, 2003 1:32 pm
Location: Bristol, UK
Contact:

Post by angelp1ay » Wed Dec 13, 2006 12:17 am

ycl6 wrote:
jerryT wrote:Does this MOD or can this MOD delete the user and their posts ??

Same as phpBB, this MOD does not delete user's posts.

~Mac

Could this be tied in to the current ACP method of deleting users rather than relying on another file (delete_user.php)?

Thank you for the mod. I'm sure it will be put to very good use!


Edit: and...

viewtopic.php code

Code: Select all

$delete_user_img = '<a href="' . $temp_url . '"><img blah
$delete_user = '<a href="' . $temp_url . '">' . sprintf( blah
memberlist.php code

Code: Select all

$delete_user_img = '&nbsp;<a href="' . $temp_url . '"><img blah
$delete_user = '&nbsp;<a href="' . $temp_url . '">' . sprintf( blah
There are a couple of missing &nbsp;s in viewtopic.php

Khem
Registered User
Posts: 13
Joined: Sat Aug 09, 2003 5:50 am

Post by Khem » Wed Dec 13, 2006 7:58 am

just about to run thru the install, still getting the hang of adding mods...

the first line has thrown me

copy delete_user.php to delete_user.php

where are we copying it to? to the root dir of phpbb?

:lol: :oops:

think that should cover it, the rest looks pretty straight forward

never mind, got it

angelp1ay
Registered User
Posts: 175
Joined: Tue Dec 23, 2003 1:32 pm
Location: Bristol, UK
Contact:

Post by angelp1ay » Wed Dec 13, 2006 2:22 pm

Khem wrote: the first line has thrown me

copy delete_user.php to delete_user.php

where are we copying it to? to the root dir of phpbb?

Indeed. Just prefix the destination with the path to your phpBB install. It isn't quite so obvious for files going into the root.

OreGal
Registered User
Posts: 156
Joined: Thu Feb 17, 2005 7:35 pm

Post by OreGal » Thu Dec 14, 2006 3:29 pm

Does anybody know how I can change this to allow my moderators to also delete these users? We're having a terrible time with spammers and I need to give them this capability.

by the way, love this. Thank you.

angelp1ay
Registered User
Posts: 175
Joined: Tue Dec 23, 2003 1:32 pm
Location: Bristol, UK
Contact:

Post by angelp1ay » Thu Dec 14, 2006 4:24 pm

It will be something fairly simple like...

DON'T MAKE THESE CHANGES - THIS CODE IS JUST A GUESS

Change...

Code: Select all

// Delete User MOD
if ( $userdata['user_level'] == ADMIN && $poster_id != ANONYMOUS )
{
to...

Code: Select all

// Delete User MOD
if ( ($userdata['user_level'] == ADMIN || $userdata['user_level'] == MODERATOR ) && $poster_id != ANONYMOUS )
{
...quite a few times...

DON'T MAKE THESE CHANGES - THIS CODE IS JUST A GUESS

But I don't know the exact syntax and you don't want anyone to be able to do it so best to make sure it's done properly. Should be a fairly simple alteration though.

Hippo4ever
Registered User
Posts: 2
Joined: Tue Dec 19, 2006 11:25 pm

Debug help

Post by Hippo4ever » Tue Dec 19, 2006 11:34 pm

Code: Select all

Could not delete auto-login keys for this user

DEBUG MODE

SQL Error : 1146 Table 'zozz_tracker.SESSIONS_KEYS_TABLE' doesn't exist

DELETE FROM SESSIONS_KEYS_TABLE WHERE user_id = 14

Line : 250
File : delete_user.php
I deleted user, but final "run" is error ^^.

Please help me! :(

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 » Wed Dec 20, 2006 12:43 am

I think you forgot to edit the constants file

~Mac

Hippo4ever
Registered User
Posts: 2
Joined: Tue Dec 19, 2006 11:25 pm

Post by Hippo4ever » Wed Dec 20, 2006 8:25 am

constants file?

Where is find the file?

angelp1ay
Registered User
Posts: 175
Joined: Tue Dec 23, 2003 1:32 pm
Location: Bristol, UK
Contact:

Post by angelp1ay » Wed Dec 20, 2006 11:14 am

Hippo4ever wrote: constants file?

Where is find the file?

includes/constants.php

Post Reply

Return to “[2.0.x] MOD Database Releases”