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.

Getting rid of membership levels??

Home Forums Community Forum Getting rid of membership levels??

This topic contains 10 replies, has 5 voices. Last updated by  Greg B 3 years, 4 months ago.

Topic Author Topic
Posted: Wednesday Apr 18th, 2012 at 6:48 pm #11165

I installed the free version on a site (the wrong one,as it turned out), and so, after having a look around, I uninstalled it. However, I am now left with the levels of membership whenever I am presented with the options of roles in any widget etc…
Obviously, I would like them gone, but I cannot find out where those roles are being picked up from. Can someone please tell me which files I need to check to get rid of this annoyance?
All I want to have is a simple list of admin/editor, user etc back but s2membership levels keep appearing.
Any pointers or help would be really appreciated!!
Thanks

List Of Topic Replies

Viewing 10 replies - 1 through 10 (of 10 total)
Author Replies
Author Replies
Posted: Wednesday Apr 18th, 2012 at 9:08 pm #11177
David Welch
Username: dwbiz05

The roles are set in the database as a serialized array. You will need to edit this array to remove the s2member levels from the roles.

table: wp_options
meta_key: wp_user_roles
try changing the meta_value to this:

a:5:{s:13:"administrator";a:2:{s:4:"name";s:13:"Administrator";s:12:"capabilities";a:67:{s:13:"switch_themes";b:1;s:11:"edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:12:"delete_users";b:1;s:12:"create_users";b:1;s:17:"unfiltered_upload";b:1;s:14:"edit_dashboard";b:1;s:14:"update_plugins";b:1;s:14:"delete_plugins";b:1;s:15:"install_plugins";b:1;s:13:"update_themes";b:1;s:14:"install_themes";b:1;s:11:"update_core";b:1;s:10:"list_users";b:1;s:12:"remove_users";b:1;s:9:"add_users";b:1;s:13:"promote_users";b:1;s:18:"edit_theme_options";b:1;s:13:"delete_themes";b:1;s:6:"export";b:1;s:22:"access_s2member_level0";b:1;s:22:"access_s2member_level1";b:1;s:22:"access_s2member_level2";b:1;s:22:"access_s2member_level3";b:1;s:22:"access_s2member_level4";b:1;}}s:6:"editor";a:2:{s:4:"name";s:6:"Editor";s:12:"capabilities";a:39:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:22:"access_s2member_level0";b:1;s:22:"access_s2member_level1";b:1;s:22:"access_s2member_level2";b:1;s:22:"access_s2member_level3";b:1;s:22:"access_s2member_level4";b:1;}}s:6:"author";a:2:{s:4:"name";s:6:"Author";s:12:"capabilities";a:15:{s:12:"upload_files";b:1;s:10:"edit_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:4:"read";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;s:22:"delete_published_posts";b:1;s:22:"access_s2member_level0";b:1;s:22:"access_s2member_level1";b:1;s:22:"access_s2member_level2";b:1;s:22:"access_s2member_level3";b:1;s:22:"access_s2member_level4";b:1;}}s:11:"contributor";a:2:{s:4:"name";s:11:"Contributor";s:12:"capabilities";a:10:{s:10:"edit_posts";b:1;s:4:"read";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;s:22:"access_s2member_level0";b:1;s:22:"access_s2member_level1";b:1;s:22:"access_s2member_level2";b:1;s:22:"access_s2member_level3";b:1;s:22:"access_s2member_level4";b:1;}}s:10:"subscriber";a:2:{s:4:"name";s:10:"Subscriber";s:12:"capabilities";a:3:{s:4:"read";b:1;s:7:"level_0";b:1;s:22:"access_s2member_level0";b:1;}}}

Hope that helps,

Dave

Posted: Thursday Apr 19th, 2012 at 11:27 am #11252

OK, So I opened the database, and found the wp_options table….where’s the metadata, and how do I change it? Also, I notice that the code you sent me still has s2member data in it. Is that correct?
Or…dare I say it….is there an easier way than this?
Thanks :-)

PS Could not find any data which started as yours did with “a:5:{s:13:”administrator”;a:2:……..” Found other stuff by browsing the wp_options table and expanding the texts, but not the above.

  • This reply was modified 4 years, 8 months ago by  Nigel Percy.
Posted: Thursday Apr 19th, 2012 at 10:28 pm #11304
David Welch
Username: dwbiz05

LOL sorry, was dealling with meta values all day…

table: wp_options
(column) option_name: wp_user_roles
(column) option_value is what needs to be changed.

The value I gave you should be good. I just removed the actual s2member roles. I didn’t remove the capabilities to access those levels by admin, authors, etc. Those capabilities are what you are seeing. If you use it to replace your roles, you shouldn’t see any s2member roles in the dropdown.

You won’t find any data that starts exactly like mine because mine is already altered. since it’s a serialized array, your’s will look different as there are more roles in your array.

Unfortunately, s2member does not remove it’s role information from the database (not sure why), so unless you use some other plugin… like a Role Editor plugin or something, you’d have to do it this way. I’ve not tried removing roles via a plugin, but that may be an easier option.

Hope that helps.

Dave

Posted: Friday Apr 20th, 2012 at 12:01 am #11318

Thank you. I’ll give this a try tomorrow and let you know.

Posted: Monday Mar 18th, 2013 at 2:51 pm #45071

I should put my two-cents in here to help others in this situation as I have done the above suggested (changing the ‘wp_user_roles’ data to the above, as well as a custom one [since I have also created different user roles via ‘User Role Editor’ plugin]), and it worked, BUT rather than delving into the database and possibly doing something wrong (especially if an individual is uncomfortable accessing the database), this can all be handled via front-end:

SCENARIO: If you happen to have either default S2Member user roles (S2Member levels 1-4) AND/OR custom ones you’ve made (via utilizing ‘wp-config.php’ to add new roles [ http://www.s2member.com/faqs/#s2-faqs-level-extensions ]), and you realize that you don’t want to use certain roles AND/OR eliminate them all-together, you need to install the WordPress plugin ‘User Role Editor‘.

Once installed, access it via your admin panel under ‘USERS: USER ROLE EDITOR’. Once here, you will see a ‘Role Chart’ and a list of roles you can check/uncheck for certain users. Avoid this for now, and scroll down until you see the tab named ‘Delete Role’ – Once here, click the down arrow to view all the roles currently associated to your website (example: editor, s2Member Level01, etc.), and one-by-one you can delete each role you don’t want anymore. Keep doing this until you’ve deleted all the user-types you don’t want anymore. Easy as that.

NOTE: If you DID add more levels via the ‘wp-config.php’ method pointed out above, you will definitely want to ensure you edit that file to reflect your intention (example: if you want to remove ALL S2member levels, then just delete the code within wp-config.php define(“MEMBERSHIP_LEVELS”, 4); – OR – if you just want to remove certain ones, BUT are keeping some custom ones, you will want to change the define(“MEMBERSHIP_LEVELS”, 4); from ‘4’ [or whatever number] to your new proposed number).

The method mentioned previous to mine works just fine, but if you’re uncomfortable tinkering in database files and are looking for a solid ‘front-end’ solution, then use ‘User Role Editor’ and you will be a happy person :)

Hope this helps out others who are finding it difficult to delete/edit user roles they don’t need anymore :)

Roger Sanchez

Posted: Friday Aug 9th, 2013 at 8:39 pm #55503
Greg B
Username: birdog

Can you please fix this for the future? I had to go to every single website in my network to manually remove all of s2member roles upon deactivating or deleting even after removing the “safeguards”. I am sure others would appreciate that too. In case I ever reinstall s2member in the free or in the pro version you guys really need to assure us that these roles will be removed when deactivating and uninstalling/deleting.

Thanks a lot.

Also, thank you Roger Sanchez in post #45071

:)

Greg

  • This reply was modified 3 years, 4 months ago by  Greg B.
Posted: Monday Aug 19th, 2013 at 11:34 am #56163
Neal Katz
Username: nkatz

I second that request, Greg. A well-behaved piece of software should clean up after itself when uninstalled. My situation was pretty much exactly like yours. I just used the User Role Editor plugin recommended above to delete the s2member user roles individually…but I’ve still got s2member GZIP exclusions in my .htaccess file which makes me wonder where ELSE I might still have s2member artifacts laying around.

Posted: Monday Aug 19th, 2013 at 12:13 pm #56165
Greg B
Username: birdog

Hi @NealKatz

lol … I hear ya on that.

However, in addition to manually uninstalling the membership levels, did you do this before uninstalling?

Dashboard -› s2Member® -› General Options -› Deactivation Safeguards

disable the safeguards, then you can uninstall. which should then remove all s2 options etc.

If not, maybe try reinstalling it and then doing this:
Dashboard -› s2Member® -› General Options -› Deactivation Safeguards

disable the safeguards, then you can uninstall. which should then remove all s2 options etc.

then, uninstalling the membership levels (if they appear again) manually last.

Try it out and let me know…

I think that worked for me and I don’t see any trace of s2member (as far as I know).

:)

Greg

Posted: Monday Aug 19th, 2013 at 12:21 pm #56166
Neal Katz
Username: nkatz

Ah, cheers! I guess it DOES behave itself – you just have to know to change that default setting.

Thanks, Greg :)

Posted: Monday Aug 19th, 2013 at 12:27 pm #56167
Greg B
Username: birdog

@NealKatz

Wonderful!

Big smile!

Greg

Viewing 10 replies - 1 through 10 (of 10 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.