Skip Navigation

[Resolved] My Account view showing too many users

This support ticket is created 4 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 10 replies, has 2 voices.

Last updated by nicolaS-3 4 years, 1 month ago.

Assisted by: Waqar.

Author
Posts
#1484775

Hi,
I have a My Account page that is supposed to show current logged-in user's meta data only (no login form as described in your docs). The view works fine, but it shows data for all users with the same role, not just the current user. I read through your docs and tried the followings, but with no success.

{!{wpv-view name='MY VIEW NAME' users="[wpv-user field='ID']"}!}
{!{wpv-view name='MY VIEW NAME' users="[wpv-current-user info='id']"}!}

It seems that there is no way to apply any filter as well. Any clue ? thanks
Regards
Nicolae?

#1486725

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Nicolae,

Thank you for contacting us and I'd be happy to assist.

To troubleshoot and suggest the best way forward, I'll need to see exactly how this "my account" page and the view in it, is set up.

Can you please share temporary admin login details, along with the link to the "my account" page?

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

regards,
Waqar

#1487951

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing the admin access.

Unfortunately, I've tried accessing the website using a couple of different internet and VPN connections, but the Wordfence plugin keeps blocking me with a message:
"Your access to this site has been limited"

Can you please temporarily disable any GEO IP restrictions from the website and let me know?

#1488141

Hi
ooops sorry I forgot that "detail" ... which country are you from ? or, better, do you have an IP I can whitelist ?
thanks
Regards
Nicola

#1488331

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for writing back and I'm from Pakistan.

You can whitelist this IP address: 72.255.36.152

regards,
Waqar

#1488337

ok, try now
thanks
Regards
Nicola

#1488571

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for allowing access to the website.

I noticed a couple of issues with the view "Account utente loggato"

1. In the page "Il mio Account utente", the shortcode for the view is not properly nested:

The correct usage would be:


{!{wpv-view name='account-utente-loggato' users='{!{wpv-user field='ID'}!}'}!}

2. In the view's "Query Filter" section no filter exists to show only a specific user. If you'd like to limit the view to user whose ID is passed through the view's shortcode attribute "users", you can include query filter as shown in the screenshot:
hidden link

3. In the page "Il mio Account utente", the shortcode "{!{wpv-user field='ID'}!}" isn't returning the ID of the currently logged in user as it should.

To troubleshoot this, I'll need to perform some troubleshooting on your website's clone/snapshot.

Do I have your permission to download a fresh duplicator package from your website?
( the Duplicator plugin is already installed )

Once I'll have the confirmation, I'll download the clone and will perform some tests on my own server, without affecting the actual website.

#1488577

Hi Waqar,
Yes, you have my permission, giving for granted that the copy will be deleted once the support thread is closed.
Kind regards
Nicola

#1488795

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Nicola,

Thank you for your permission and I've successfully deployed your website's clone on my server.

I'll share my findings with you as soon as this troubleshooting completes and the clone will be deleted too.

regards,
Waqar

#1491519

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Nicolae,

Thank you for waiting while I performed some troubleshooting on your website's clone.

During testing, I noticed that to show the currently logged-in user's details through the view "Account utente loggato", the following changes were needed:

1. The correct shortcode for the view in the page "Il mio Account utente" needed to be changed to:


{!{wpv-view name='account-utente-loggato' users='{!{wpv-user field="ID"}!}'}!}

2. In the view "Account utente loggato", only "subscriber" role was selected and no query filter was added.
I selected "Any role" option in the content selection and included a query filter to get the details of only that user, whose ID has been passed through the "users" attribute.

( screenshot: hidden link )

As a result, now when you'll visit the page ( hidden link ), you'll see the correct user's details.
( screenshot: hidden link )

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1491999

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.