Timberyom
Forum Replies Created
-
actually (‘name’,’name’,’name’)…right…thanks lol
Is this correct…
<?php
$blogusers = get_users( ‘&role=subscriber’ );
foreach ($blogusers as $user) {
$u = new WP_User( $user->ID );
$u->add_cap( ‘name_of_ccap,name_of_ccap,name_of_ccap’ );
}Excellent thank you, and how would I add more than one ccap…
does this just disable ip restrictions, or all restrictions? it would be perfect if it disables all..including ip restrictions and simultaneous login
add_filter('ws_plugin__s2member_disable_specific_ip_restriction'
Ok, A couple of things.
It appears that there is no specific error message for users who cannot login because they are already logged in. This could be very frustrating for the user — is there a way for me to create a unique message so they know the reason they cannot login? I have changed the general error message but it would be nice to have one unique to this situation.
Second, is there a filter/hook I can use to only disallow simultaneous login for certain levels? (ie all except level X and Y).
Ah. got it. Ive deleted the plugin, and the cache folder. Is there anything else I should look out for to remove?
Fastest Cache, but deleted now…along with the cache folder, problem solved.
Ok so I deleted the cache file through FTP and the backend of s2member looks normal.
At the moment some users can login but some cannot.
Thanks
Just so its clear – I only want to prevent a single level (level 9) from being able to edit their profile. The level will be used by many and it has no ip restrictions. I will stop this level from being able to see certain content using s2 shortcode conditionals – however no level 9 user should be able to edit the profile ie change the password.
Is there an easier way to prevent a single level from being able to edit their profile/change password – ie through the s2pro login php widget or through wp-login.php?
Cheers.
deleted the s2-hack file completely so the site is back up and running with IP restrictions in force for all users which is a bit problematic.
Help very much appreciated! ??
Hi, so i added the code, and now users are unable to login to the site at all.
Its probably because I already have some code in s2hacks preventing ip restrictions for level 7 upwards and added the additional code incorrectly.
here is my already existing code, how would I add to it?
<?php add_filter('ws_plugin__s2member_disable_specific_ip_restriction', 's2hack_disable_certain_ip_restrictions', 10, 2); function s2hack_disable_certain_ip_restrictions ($bool, $vars) { if(username_exists($vars['restriction'])) { // Check if this is a Username $user = new WP_User($vars['restriction']); // This is now a WordPress User Object if($user->has_cap('access_s2member_level7')) // If User is s2Member Level 7 or higher, don't run IP Restrictions return true; } return false; // If the User doesn't match the needed specifics, then we run IP Restrictions } ?>
Any idea why and how I can get the site back and running with s2member – maybe I have to install a fresh copy?
Forum: Plugins
In reply to: [s2member Secure File Browser] open pdf in new windowIt is already set as loading pdfs as inline file extension.
Thanks, we’ll have someone look into it.
Forum: Plugins
In reply to: [s2member Secure File Browser] open pdf in new windowthanks for your response.
Unfortunately it did not work. We only offer pdf files so it would have been ok to enable it for all files.
Forum: Plugins
In reply to: [WP Video Lightbox] Images display incorrectlyI repeat, it doesn’t work. we’ll get the upgrade.