Back to vBulletin 3.0 Add-Ons

When you change a username, update thread starter (without updating all threads)
Mod Version: 1.00, by sblum

This modification is in the archives.
vB Version: 3.0.4 Rating: (0 vote - 0 average) Installs: 2
Released: 05 Jan 2005 Last Update: Never Downloads: 0
Not Supported  

This is a pretty simple hack. I was annoyed by the fact that when you change somebody's username it doesn't edit the thread starter field to include their new name, and on a large board updating all threads information is a huge pain in the ass.

Open up admincp/user.php

find:
Code:
		$olduser = strlen($olduserinfo['username']);
		$newuser = strlen($user['username']);
		$DB_site->query("
			UPDATE " . TABLE_PREFIX . "pmtext
			SET touserarray = REPLACE(touserarray, 'i:$userid;s:$olduser:\"" . addslashes($olduserinfo['username']) . "\";','i:$userid;s:$newuser:\"" . addslashes($user['username']) . "\";')
		");
add right after:
Code:
		//update thread starter
		$DB_site->query("
				UPDATE " . TABLE_PREFIX . "thread
				SET postusername = '" . addslashes($user['username']) . "'
				WHERE postuserid = $userid
		");

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2024