--- webform.module.orig Fri Feb 27 23:35:15 2009 +++ webform.module Sat Oct 10 12:32:16 2009 @@ -2099,6 +2110,7 @@ */ function _webform_filter_values($string, $node = NULL, $submission = NULL, $strict = TRUE) { global $user; + global $webform_uid_cached; // Setup default token replacements. $find = array('%site', '%date'); @@ -2123,8 +2135,9 @@ $find[] = '%useremail'; $replace[] = isset($user->name) ? $user->name : ''; $replace[] = isset($user->mail) ? $user->mail : ''; - if ($user->uid && module_exists('profile')) { + if ($user->uid && module_exists('profile') && $webform_uid_cached != $user->uid) { profile_load_profile($user); + $webform_uid_cached = $user->uid; } // Provide a list of candidates for token replacement.