Quote:
Originally Posted by justasiam
The last bit of code works in the forums, but not in the CMS.
Ideas?
|
Okay, give this a try:
PHP Code:
if (in_array(THIS_SCRIPT, array('showthread', 'vbcms')))
{
global $post;
if (!$post)
{
$post = fetch_userinfo($memberinfo['userid']);
}
$new_name = $post['field4'];
if ($new_name)
{
$memberinfo['musername'] = str_replace($memberinfo['username'], $new_name, $memberinfo['musername']);
$memberinfo['username'] = $new_name;
}
}