Ok, the code is the following:
if (!function_exists('wfu_before_file_check_handler')) {
function wfu_before_file_check_handler($changable_data, $additional_data) {
$user = get_userdata($additional_data["user_id"]);
if ( $user != false ) {
$username = $user->user_login;
$filename = wfu_basename($changable_data["file_path"]);
$filepath = wfu_basedir($changable_data["file_path"]);
$changable_data["file_path"] = $filepath.$username."-".$changable_data["user_data"][0]["value"];
}
return $changable_data;
}
add_filter('wfu_before_file_check', 'wfu_before_file_check_handler', 10, 2);
}
You have the Free or Pro version of the plugin? instructions on where to put the boave code are different.
Nickolas