On a Linux/Unix machine, you can use this script
Code:
# !/bin/bash
# Replace a text inside all files of current dir
# Customize $a and $b variables
# text to search
a='TABLE_PREFIX . "user';
# text to replace
b='USER_PREFIX . TABLE_PREFIX . "user';
for i in `grep -lr $a`
do
echo $i;
mv $i $i~
sed -e "s/$a/$b/g" $i~ > $i
rm $i~
done
Run this script from the forum root 4 times: one for "user" (as above), one for "cp", one for "pm", and one for "custom".
Of course, you still need to manually modify the scripts that use a variable like $table instead of 'user[...]' (and stuff), as stated in first post, adding USER_PREFIX where needed, and insert somewhere your definition (I inserted it in class_core.php, just below the TABLE_PREFIX one).
I also noticed a lack in the first post: if you want to also keep avatar images, you should modify image.php in line 129, adding as usual "USER_PREFIX . " before TABLE_PREFIX.