Forum Replies Created
-
AuthorPosts
-
graspdigitalMember
This is quite an urgent issue now.
Is there a fix for this or will there be? It seems that other people have experience the same issue but doesn’t seem to be any solution to this.
Any help would be much appriciated.
Thanks
November 27, 2012 at 9:22 pm in reply to: Email notification containing custom checkbox fields #2517graspdigitalMemberI’ve actually just got this working, for anyone that needs this solution, the function inside umSupportProModel.php starting from line 326 is this:
function convertUserContent( $user, $data, $extra=array() ){
preg_match_all( ‘/\%[a-zA-Z0-9_-]+\%/i’, $data, $matches);
if( is_array( @$matches[0] ) ){
$patterns = $matches[0];
$replacements = array();
foreach( $patterns as $key => $pattern ){
$fieldName = strtolower( trim( $pattern, ‘%’ ) );
if( $fieldName == ‘site_title’ )
$replacements[ $key ] = get_bloginfo( ‘name’ );
elseif( $fieldName == ‘site_url’ )
$replacements[ $key ] = site_url();
elseif( $fieldName == ‘avatar’ )
$replacements[ $key ] = get_avatar( $user->ID );
elseif( $fieldName == ‘login_url’ )
$replacements[ $key ] = wp_login_url();
elseif( $fieldName == ‘logout_url’ )
$replacements[ $key ] = wp_logout_url();
elseif( $fieldName == ‘lostpassword_url’ )
$replacements[ $key ] = wp_lostpassword_url();
elseif( $fieldName == ‘admin_url’ )
$replacements[ $key ] = admin_url();
elseif( $fieldName == ‘activation_url’ )
$replacements[ $key ] = self::userActivationUrl( ‘activate’, $user->ID, false );
elseif( $fieldName == ’email_verification_url’ )
$replacements[ $key ] = self::emailVerificationUrl( $user );
elseif( $fieldName == ‘login_form’ )
$replacements[ $key ] = self::lgoinForm();
elseif( $fieldName == ‘lostpassword_form’ )
$replacements[ $key ] = self::lostPasswordForm();
else
$replacements[ $key ] = @$user->$fieldName;
if( is_array( $replacements[ $key ] ) ) {
$replacements[ $key ] = implode( ‘,’, $replacements[ $key ] );}
}$data = str_replace($patterns, $replacements, $data);
}November 21, 2012 at 10:05 pm in reply to: Email notification containing custom checkbox fields #2481graspdigitalMemberHi,
Thanks for this. I’ve tried this and it doesn’t seem to do anything.
It is also a problem for when your exporting to csv too.This is my code now from lines 353 to 362:
elseif( $fieldName == ‘lostpassword_form’ )
$replacements[ $key ] = self::lostPasswordForm();
else
if( is_array( $replacements[ $key ] ) ){
$replacements[ $key ] = implode( ‘,’, $replacements[ $key ] );
}
$replacements[ $key ] = @$user->$fieldName;
}
$data = str_replace($patterns, $replacements, $data);
}November 20, 2012 at 4:16 pm in reply to: Email notification containing custom checkbox fields #2476graspdigitalMemberI am having the exact same problem and still not managed to find a solution.
If anyone has any answers it would be very much appreciated.
Thanks -
AuthorPosts