[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

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

Post by ycl6 »

It IS for phpBB2 :wink: As the MOD file says
##############################################################
## Author Notes:
## Tested on 2.0.21. Can be installed using EasyMOD 0.3.0


In viewtopic.php:

Code: Select all

	$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($postrow[$i]['username']) . "&showresults=posts");
	$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '" title="' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '" border="0" /></a>';
	$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '</a>';
~Mac
trackmark
Registered User
Posts: 1
Joined: Tue Oct 03, 2006 2:19 am

Post by trackmark »

I *hate* using MODS but this one is a cracker! :)

Well done!!!!

I have lots of spammers trying to get account activation where they have spam sites in their profile. It takes multiple steps to rid these jerks, but this mod just makes it a PLEASURE! Come on spammers! waste your time on my board and one click and your gone! OK, one click and a confirmation button!

This MOD should be standard on the PHPbb3.


Thanks so much! :)
fwj
Registered User
Posts: 4
Joined: Sat Oct 07, 2006 7:44 am
Location: California

How clean is this delete?

Post by fwj »

This mod sounds great. I have a question before I install it. I assume the answer to this will be yes but I really need to ask. :oops:

Does this mod delete the user in exactly the same way as if I go to the ACP/UserAdmin/Management panel and look up a user and check the "Click here to delete this user" box at the bottom of the page? That is, does this mod remove all the same database entries?

And just to be sure, does it cleanly remove references that are Activated as well as not-Activated? And does it do this for a username that is in the middle of the list of user names as well as the end of the list?

Please excuse this question if it seems obvious, but I don't want to leave junk laying around in the database.

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

Post by ycl6 »

1. Yes, as commented in delete_user.php

Code: Select all

//
// Start Delete (code borrowed from admin_users.php)
//
if( $userdata['user_id'] != $user_id )
{
	if (!($this_userdata = get_userdata($user_id)))
	{
		message_die(GENERAL_MESSAGE, 'No_user_id_specified');
	}

	if( $confirm )
	{
...
...
2. For non-active users, as long as they are listed in the memberlist, you can delete them. However, since they haven't posted, you have no ways of deleting them from viewtopic. Same goes for viewprofile page, as long as you know their viewprofile URL, you will see the delete button

3. Not quite sure what you mean by that.

p.s. I should have included screenshots :?

~Mac
fwj
Registered User
Posts: 4
Joined: Sat Oct 07, 2006 7:44 am
Location: California

RE: How clean is this delete?

Post by fwj »

Thanks ycl6, fine answer.

It sounds like the internal delete process is exactly like admin_users and that is what my queston was.

No screen shots necessary...
My question wasn't about how/where I see a delete button, but about what happens when I click it.

And thanks for all your work on the mod! :D

fwj
MRM4
Registered User
Posts: 83
Joined: Thu May 15, 2003 3:50 am

Post by MRM4 »

I got the following error while using EasyMOD:

FIND FAILED: In file [memberlist.php] could not find:

$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $username) . '</a>';

MOD script line #90
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

Inside the default file (2.0.21), the code looks like

Code: Select all

		$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($username) . "&showresults=posts");
		$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . sprintf($lang['Search_user_posts'], $username) . '" title="' . sprintf($lang['Search_user_posts'], $username) . '" border="0" /></a>';
		$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $username) . '</a>';

		$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
		$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

		$template->assign_block_vars('memberrow', array(
Please check your file.

~Mac
User avatar
chasetec
Registered User
Posts: 33
Joined: Sun Jun 18, 2006 4:56 pm

Post by chasetec »

How about making this delete all the users posts and adding their email address to the ban list when deleting them?
hitemuprobbo
Registered User
Posts: 213
Joined: Thu Apr 21, 2005 3:07 pm
Location: Tha UK!

Post by hitemuprobbo »

thank you so much, i have around 1,250 members with viagra/loan/the rest of that junk web addresses, this will help me clean up the situation perfectly!!!

THANKS SO MUCH! If this mod works it wil lbe the most handy iv installed!
Fynci
Registered User
Posts: 16
Joined: Sat Dec 10, 2005 11:18 pm

Post by Fynci »

This would save me a huge headache, however I am having some problems. When I remove anybody, I get the following message:
Could not delete auto-login keys for this user

DEBUG MODE

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

DELETE FROM SESSIONS_KEYS_TABLE WHERE user_id = 2809

Line : 250
File : delete_user.php


Any ideas what could be causing this?
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

Have you executed the SQL command?

~Mac
Fynci
Registered User
Posts: 16
Joined: Sat Dec 10, 2005 11:18 pm

Post by Fynci »

I must be blind Mac, but I can't see anywhere in the readme file which mentions anything about running an SQL command. What am I missing?

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

Post by ycl6 »

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
Fynci
Registered User
Posts: 16
Joined: Sat Dec 10, 2005 11:18 pm

Post by Fynci »

Thanks a million Mak, it works a treat.
Twitcheh
Registered User
Posts: 4
Joined: Fri Nov 10, 2006 3:43 am

Post by Twitcheh »

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?
Post Reply

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