Skip Navigation

[Resolved] How to allow a User to edit a different User vis Front End User Form

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user would like to manage users from the frontend.

Solution:
Check this reply https://toolset.com/forums/topic/how-to-allow-a-user-to-edit-a-different-user-vis-front-end-user-form/#post-2017077

This support ticket is created 3 years 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: Africa/Casablanca (GMT+01:00)

This topic contains 3 replies, has 2 voices.

Last updated by KeithM7209 3 years ago.

Assisted by: Jamal.

Author
Posts
#2016973

Tell us what you are trying to do?
I'm trying to give my client the ability to edit Users of a different Role, via the front end of the website, using Toolset User Forms. But I just cannot get it to work. I have tried following the directions in these 2 threads:
https://toolset.com/forums/topic/let-an-admin-edit-users-through-a-cred-form/
https://toolset.com/forums/topic/cred-edit-user-form-only-allowing-me-to-edit-my-own-profile/

I have followed all the instructions in both of those threads, but I am not able to get it to work. All that happens is I get the user form appearing with the same details (my logged in user account details) and not the details of the user I wish to change. The URL on the form page shows as 'hidden link' (my-domain is of course replaced with my actual domain, edit-client-user is the slug of my page which displays the shortcode '[wpv-view name="users-filter-view"]' and 'users filter view' is of course the name of my view. The number '3' in the url changes dynamically depending on which link I click, but regardless of this number, it always just displays my own login details in the user form, and not the details of, for example, the user which has the user id of 3.

Please can you provide a clear (and simple to understand) step by step instructions for how I can edit other users via a toolser user form in the front end of the website?

Thank you very much for your help,
Keith

Is there any documentation that you are following?
https://toolset.com/forums/topic/let-an-admin-edit-users-through-a-cred-form/
https://toolset.com/forums/topic/cred-edit-user-form-only-allowing-me-to-edit-my-own-profile/

Is there a similar example that we can see? no

What is the link to your site? I can provide this (and login details) if required, I will just need a private text box to provide them in please.

#2017077

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for contacting the Toolset support.

Are you willing to list the users and edit a user(Id from URL param) on the same page? If yes. You need to put the form inside the page(before or after the view). You can put the form with the following shortcode:

[cred_user_form form="Name of the edit form" user="[wpv-search-term param='users-filter']"]

Read about both shortcodes here:
- https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-214940
- https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_user_form

Please note that you need to register the "wpv-search-term" shortcode in Toolset->Settings->Frontend Content->Third-party shortcodes to be evaluated inside the form shortcode and return the ID from the parameter URL 'users-filter'.

You may want to wrap the form inside a conditional shortcode to display it when it is expected(correct URL param, authorized user).

If you will be using two different pages. Put the form shortcode on the edit page.

Please note that you are using Toolset Access, you need to specify the access rules per form in Toolset->Access Control->Forms(tab)

I hope this helps. Let me know if you have any questions.

#2018183

Hi Jamal, I hope you are well.

I don't really fully understand why it works which is a shame - but I have followed your instructions and I have got it to work on the same page 🙂

Thank you SO MUCH! I am really grateful for your assistance. I will now close this ticket

#2018185

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.