mix html and shortcode in a page or post

I use a child theme and in this child theme I have added functions so I can use shortcodes to display user information, such as name with [user-name] or email with [user-email].

When I put my shortcodes in my posts or pages, they work just fine.

But I need to do something more.

I need to display in a WP page statistics information about the connected user. This information comes from an application outside of WP.

So I need to display an iframe in a WP page, with a URL with a parameter given by my short code.

If I put this:
<iframe width="600" height="200" src="http://www.mydomain.com?user=[user-id]"</iframe>
I get this as iframe URL:
http://www.mydomain.com?user=user-id

And if I put this:
<iframe width="600" height="200" src="http://www.mydomain.com?user=[user-id]"</iframe>
I get this as iframe URL:
http://www.mydomain.com?user=theGoodUserId

What should I put to get the correct iframe URL:
http://www.mydomain.com?user=theGoodUserId