SOLVED: email address within external link field prepends mailto:

Hey there,

I have a fairy simple issue. I am trying to pass the users email in an external url. My link looks like this:

https://externalwebsite.com/?email={wp_user_email}

the result is:

https://externalwebsite.com/?email=mailto:usersemail@provider.com

When I put {wp_user_email} in a simple text field the returned value is just the email without the prepended mailto:

I have also made a custom function that looks like this:

$current_user = wp_get_current_user();
return $current_user->user_email;

It also prepends mailto within the url.

Filters like :text and :value didn’t work out either.

Any clue if this should be considered a bug? If not, what do I have to do to accomplish my goal?

Cheers!

This works for me, so it must something on your end that is causing the issue.

Thanks for your feedback. I’ll check!

Hi Joey,
Thanks so much for your report!

I was able to reproduce the issue and added it to our bug tracker.

Best regards,
timmse

1 Like

Hey timmse,

glad you could reproduce it, danke.

Cheers!

Hi Joey,
We’ve fixed this bug in Bricks 1.7.1, now available as a one-click update in your WordPress Dashboard.

You can use the :text filter like this: {wp_user_email:text}
Please let us know if you are still experiencing issues.

Best regards,
timmse

Hi timmse,

thanks for letting me know. I noticed it already when I read the changelog! Awesome update. :slight_smile:

Best wishes
Joey

1 Like