Skip Navigation

[Résolu] CRED edit user form only allowing me to edit my own profile

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Marqué : 

This topic contains 12 réponses, has 2 voix.

Last updated by Beda Il y a 5 années et 7 mois.

Assigned support staff: Beda.

Auteur
Publications
#363504
CRED-User-Frontend-Access.png
CRED-Frontend.png
CRED-Edit-User-Form-Settings.png

I am trying to: edit another users profile using the CRED edit user form.

I've attached some screen shots showing the issue.

CRED-Frontend.png you can see the my username of "realize" is greyed out. Not allowing me to edit other users.

CRED-Edit-User-Form-Settings.png you can see that I have a CRED form to edit the role of "leaders"

CRED-User-Frontend-Access.png you can see that I have the ACCESS set to allow Admin, Editor, Author and Program Host roles to have permission to edit the CRED edit user form titled "Edit-Leader"

What am I doing wrong?

p.s. I am signed in with my admin account.

#363585

WordPress does not allow to edit UserNames.

You can head to your Users > All > Edit and see the same behavior there.
You can use Custom Plugins or approaches to workaround this WordPress restriction:
hidden link

As I see in your screenshots all other Fields are correctly editable, right?

If that's the case, this is expected WordPress behavior, and CRED is working correctly.

Please do not hesitate to open a new thread if other issues or problems arise

Thank you for your patience.

#363589

But I want to make it so my "program host" role can edit my "leaders" roles profiles. And they can't access all users in wp-admin.

#363594

I understand, but WordPress does not allow to edit a WordPress UserName.
There is now way around that unless you delete the user and recreate it, or use some 3rd Party plugins.

You will be able to edit all user Roles that you defend in your Access Setting for your specific Role.

As I see in the Screenshots you provided, this is already working?

Or do I miss a crucial step?

Thank you

#363595

I don't need to change the actual username. I need to know where I select the specific user I'm editing. The edit leader cred form is to edit the leader role, where do I select the specific user with the leader role that I want to edit?

#363752

Hello?

#363903
Bildschirmfoto 2016-02-02 um 16.44.11.png

Hello Oliver

I do not work around there hour, I apologize the delay here.
You can see my working shifts over at my profile:
https://toolset.com/forums/users/beda-s/

When you insert a CRED form, it will ask you which user to Edit.
This options are either the user in the Loop, or a specific User.
(see Screenshot)

For your gaol, since you need a list of users, and then choose a User to edit him, I suggest to create a User View.
Query the desired Role.
In the User View Loop, insert the CRED Form (link to it) for the current user in the Loop.

That will produce a list of all Users of your choice, with a Edit Link, and hitting it, will link to the CRED Form to edit that User in question.

Please do not hesitate to open a new thread if other issues or problems arise

Thank you for your patience.

#363933

Thank You. I will check your hours next time.

Can I also create links to the users profile in the view? I tried before but it gave the author link and page not found.

#363954

What user Profile are you referring to?

Toolset does not create user Profiles.
We provide Forms with CRED to edit WordPress default users, and with Views you can display them, using Fields of the users.

WordPress itself does not have a way to display the user Profile on the Front end.

CRED, when redirecting the "display the user", needs to hook into the only available Post Type which is the Author Archive.
That one will not display if the user does not have any content created, as per WordPress Design.

You might want to redirect to a message or a Custom page instead, after submitting the form

Views, if you create a Link to the user Archive, also acts the same way, hooking into the WordPress Author Archive.
If your User has content, it will work, if not, it won't.

You could create a Post type and populate it with User Data, if you need a Front End Profile of the User.

Thank you

#364200

It does not give me the option to insert the link to the form. Neither do the options in your screenshot. Also it looks like parametric search is not allow on views displaying users.

#364317

You could use a Accordion to display only a short user description, and on click, it would open the form.

User Views can not have Parametric Searches, this is correct.
I did not know you require this.

Parametric Searches can only be used on Post Views.

You can use Simple HTML though to create a DropDown Menu, which will link each user you display in it, to a page where you pass the User ID as a URL parameter.
On that Page is the View including the Edit CRED Form.

It looks like this:

1. View to create a Dropdown menu:
- Query users
- Loop output like this (or any other valid HTML)

<!-- wpv-loop-start -->
  <div class="dropdown">
    <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Users
  <span class="caret"></span></button>
  <ul class="dropdown-menu">
    <wpv-loop>
    <li><a href="<em><u>hidden link</u></em> field='ID']">Whatever you want here</a></li>
      </wpv-loop>
  </ul>
</div>
<!-- wpv-loop-end -->

2. Insert this View on any Page you want.
Please note the specific URL's in

<a href="<em><u>hidden link</u></em> field='ID']">Whatever you want here</a>

We will use that later.

3. Create a second View, here you query again users, a Query Filter is set to:

Select users with the id determined by the URL parameter "users-filter" and with role "any"
eg. yoursite/page-with-this-view/?users-filter=1

The Loop of this View holds the Edit User CRED Form as this:

[cred_user_form form="user edit" post="[wpv-user field='ID']"]

4. Now create a page with this exact slug as coded in the first View, and insert to this page the above second View created.

<em><u>hidden link</u></em>

5. Now, if you click in a user from the DropDown on the First page, this will lead to this new page, passing the User ID as a URL parameter and display the correct CRED Form.
The final example URL of this Page looks for User with ID one like this:

<em><u>hidden link</u></em>

Please let me know if the above solution works for you, I look forward to your reply!

Thank you for your patience.

#367848

Even when I choose display user in loop it still only displays the logged in user.

#367956
Bildschirmfoto 2016-02-18 um 16.27.44.png

Please follow my previous submitted detailed instructions.

It works perfectly if you follow that setup.

I outline below again the exact steps.

Please see that you need to adjust the URL of your Site and page names/slugs.

My View Queries any user, the Form /CRED) edits a given Role.

1. Create a View to create your Dropdown menu where you select the user to edit:
- Query users by role any, or any role you want
- Loop output like this (or any other valid HTML)

<!-- wpv-loop-start -->
  <div class="dropdown">
    <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Users
  <span class="caret"></span></button>
  <ul class="dropdown-menu">
    <wpv-loop>
    <li><a href="<em><u>hidden link</u></em> field='ID']">Whatever you want here</a></li>
      </wpv-loop>
  </ul>
</div>
<!-- wpv-loop-end -->

2. Insert this View on any Page you want.
Please note the specific URL's in

<a href="<em><u>hidden link</u></em> field='ID']">Whatever you want here</a>

We will use that later.

3. Create a second View, here you query again users, a Query Filter is set to:

Select users with the id determined by the URL parameter "users-filter" and with role "any"
eg. yoursite/page-with-this-view/?users-filter=1

I added a screenshot of this.

The Loop of this View holds the Edit User CRED Form as this:

[cred_user_form form="user edit" post="[wpv-user field='ID']"]

4. Now create a page with the exact slug as coded in the first View (link), and insert to this new page the above second View you created.

<em><u>hidden link</u></em>

5. Now, if you click in a user from the DropDown on the First page, this will lead to this new page, passing the User ID as a URL parameter and display the correct CRED Form.

The final example URL of this Page looks for User with ID one like this:

<em><u>hidden link</u></em>

It will enable you to edit any user you want, even if you are logged in as any other user (you will not edit "yourself")

This works very fine if setup with the above steps also outlined here:
https://toolset.com/forums/topic/cred-edit-user-form-only-allowing-me-to-edit-my-own-profile/#post-364317

§Please let me know if the above solution works for you, I look forward to your reply!

Thank you for your patience.