latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

User/Member Update via API

Home Forums Community Forum User/Member Update via API

This topic contains 3 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years, 4 months ago.

Topic Author Topic
Posted: Friday Aug 10th, 2012 at 1:23 pm #21726
Randy King
Username: RandyKing

The onboard help under “Pro API For Remote Operations” specifically states that the only API call currently available is the one shown and that is to create a user. Can that be subverted in any way to “update” an existing user? All I want to do is remotely change the custom capabilities field. I know, I know – I’m pushing on the API want list here.

Given no way to do that yet, what other ways other than direct editing of the user record can I use to modify the “ccaps” field? Essentially, I’d like to have a checkbox list of custom capabilities for a user and click “OK” to set the comma-delimited string version of what I selected into the ccaps field.

Pointers? Suggestions? Plugins that might help?

As always, Thanks!

Randy

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Saturday Aug 11th, 2012 at 3:00 am #21753

Hi Randy.

This article may be helpful: Knowledge Base » Changing Roles/Capabilities via PHP

The s2Member capabilities are independent of roles, and are prefixed with [hilite mono]access_s2member_ccap_[/hilite].

You can use the User Role Editor to look at the roles and capabilities and familiarize yourself with what you’ll be working with. http://wordpress.org/extend/plugins/user-role-editor/

If you go to the Users menu, you’ll see the User Role Editor’s entry at the bottom. If you go to the Users list, for each user you’ll have a new link to edit his capabilities.

I hope that helps!

Posted: Saturday Aug 11th, 2012 at 8:19 am #21765
Randy King
Username: RandyKing

Cristián, this is an interesting plugin, and it’s exactly what I’d like to see for editing the _ccaps_ field. Time to put on the hacking hat and see if I can tweak this thing. :)

Meanwhile, as you guys may continue to expand on the API, would love to see “Update User” come next, and maybe someone will beat me to modifying this plugin to work on the ccaps field. At least I am assuming it’s a field in the MySQL somewhere, haven’t looked yet.

Randy

  • This reply was modified 4 years, 5 months ago by  Randy King.
Posted: Monday Aug 13th, 2012 at 7:42 pm #21924

:)

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.