Skip to main content

How to display the profile image and current plan name in the user dashboard with Memberstack?

Hi guy,

I have a quick question for all.
How do I show the profile image in the user dashboard?
How to show the user's current plan name in the dashboard?

6 comments

  • Memberstack Team
    Memberstack Team Official comment

    For the profile image, use this attribute:

    data-ms-member="profile-image"
    

    Just make sure the image upload happens outside the signup form — Memberstack doesn’t store profile images during signup. So if your image element is inside the signup form, it won’t work — the image hasn’t been uploaded yet.

    To show the current plan name, MemberScript #186 is your best bet. It dynamically displays the member’s active plan, billing interval, and next billing date. Perfect for dashboards and pricing tables!

  • Chukwudi
    Chukwudi

    Hi Ramzan,

    You can use the data-ms-member="profile-image" attribute to display member's profile image as explained in this article. I'll send you something shortly on how to show the user's current plan name.

    To display a user's current plan name in the dashboard, you can follow the guidance provided in the "Display the 'Current Plan' in a Pricing Table" tutorial. This tutorial outlines the steps to add "This is your current plan" elements to your pricing table, create gated content in Memberstack, and assign the appropriate data-ms-content attributes to the "Current plan" elements.

    Here's a brief overview of the steps you'll need to take:

    1. Add "This is your current plan" Element: Incorporate elements into your pricing table that will be shown to users to indicate their current plan.
    2. Create Gated Content in Memberstack: Set up gated content that corresponds to each plan. This will allow you to control which plan information is displayed to which users based on their current subscription.
    3. Assign Data Attributes: Give the "Current plan" elements the correct data-ms-content attributes to ensure that the right plan information is shown to the right users.

    For a detailed walkthrough, refer to the tutorial here: Display the Current Plan.

    This tutorial should provide you with the necessary steps to display a user's current plan name in your dashboard effectively.

    0
  • Ramzan Ali
    Ramzan Ali OP

    this attribute not working for showing profile image
    data-ms-member="profile-image"

    0
  • Chukwudi
    Chukwudi

    Upon checking your website, I discovered you have the profile image component within a Memberstack signup form, hence, profile images aren't even uploaded on signup to Memberstack for it to be displayed on the "/standard" page.

    You'll have to place the component outside the signup form to fix this..

    0
  • Ramzan Ali
    Ramzan Ali OP

    Thank you.

    How can I restrict the signup page not open after login?

    0
  • Chukwudi
    Chukwudi
    You can add the script below before the </body> tag of your signup page. SO what it does is to check if the user who attempts to visit the sign up page is logged in, and then redirects the user to the link you set here link_to_dashboard_goes_here. Here's the code:

    <script>
    window.$memberstackDom.getCurrentMember().then((member) => {
    if (member.data) {
    window.location.href = "link_to_dashboard_goes_here";
    }
    });
    </script>
    0

Please sign in to leave a comment.

Sitemap