Skip Navigation

[Resolved] allowing logged in users to edit their own information

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

Problem:

How could I create Forms that let Administrators edit ALL user Roles and each other user only their own data?

So a Subscriber only could edit his/her data but the Admin could edit every users' data?

Solution:

You'd need Toolset Forms, Toolset Access and maybe Toolse Views for this.

1. Create a User Form to edit the user role of your choice

2. In Toolset > Access > Toolset Forms make sure Administrators can edit all users with this form, and the users of the role that the form edits, can edit only their own data (set all capabilities you need for each user role for the form)

3. Insert this Form where the users can reach it, and pass the proper User ID to edit with. Likely you want to create a View, that lists all users, and then either add the Edit user Form in the View Loop or link to it, for each user in the View loop.

Relevant Documentation:

https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-registering-users/

https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-editing/

https://toolset.com/documentation/user-guides/access-control/access-control-for-cred-forms/

https://toolset.com/documentation/user-guides/views/

This support ticket is created 4 years, 10 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 6 replies, has 2 voices.

Last updated by jonathanR-5 4 years, 9 months ago.

Assisted by: Beda.

Author
Posts
#1541299

What I'm trying to do is:

- have an administrator add basic info about a registered user (name, email etc)
- user can edit that info, and also add additional info (research interests, mentors etc) They can only edit their own info and no one elses

tried to read your documentation, but got even more confused. I'm not sure if this is a post form, user form, not a form at all, or maybe a wp-access issue.

thank you

#1541651

You need Toolset Forms and Access for this.

1. Create a User Form to edit the user role of your choice
2. In Toolset > Access > Toolset Forms make sure Administrators can edit all users with this form, and the users of the role that the form edits, can edit only their own data (set all capabilities you need for each user role for the form)
3. Insert this Form where the users can reach it, and pass the proper User ID to edit with. Likely you want to create a View, that lists all users, and then either add the Edit user Form in the View Loop or link to it, for each user in the View loop.

To create User Forms, you can follow this DOC:
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-registering-users/
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-editing/
To control those with Access, you can follow this DOC:
https://toolset.com/documentation/user-guides/access-control/access-control-for-cred-forms/
For Views, instead, you can follow the same DOC as when creating Views for Posts, just, you'd select users in the query selection of the view:
https://toolset.com/documentation/user-guides/views/

#1542599
Screen Shot 2020-03-06 at 12.59.48 PM.png

One problem I was having was creating a custom role. I found that under, Toolset > Access > Custom Roles (which now seems obvious)

Here's what I did:

1. create custom role
2. assign role to existing user
3. create User Form with:
Form Type: Edit existing user
Role of the user to create/edit: custom role
4. toolset >access > toolset forms give access to new role for "User Forms Frontend Access"

The form seems to work, BUT I want to include custom fields (you call them "Generic Fields") in the form such as "research interest" and "mentors" among other things. I add the custom fields in the form, but they are not stored in the database. How do I get custom fields to be a part of the form and get that data stored in the db and associated with the user?

#1542945

This is not related to the question about how to let users edit their information, or letting other users such as admins edit other users information.

Please if possible open one ticket for each issue.

The issue of Generic fields is not related either to letting users edit other or their own information.
We need to solve each issue in one ticket, so to avoid confusion, and enable speedy response.

To add fields to a Form that persist, you simply add Fields (wether for posts or users) in Toolset > Custom Fields.
Those then will appear in the forms (you may want to add them if the form already exists, manually when editing that form).

Generic Fields are only for "on the form", they don't save data anywhere.

So to get the data stored, you need to create real User Fields, in Toolset > Custom Fields > User Fields.

I hope this helps - please open a new ticket if other issues arise, so we can help promptly and on point.

Thanks!

#1543527

Sorry you are right, this is not about how to let users edit their information, or letting other users such as admins edit other users information. I asked two questions at once, my bad. In the future I will open a new ticket for additional questions. I appreciate your help, thank you!

#1545225

No issue at all, it's merely an organizational question 🙂

Is the problem which we handled here so far solved?
If so, then we can close this here as "fixed".

If you want I can have a look at your other ticket to, once you open one, you can link to it from here so I can check 🙂

Thanks!

#1552715

My issue is resolved now. Thank you!