jarekk
Forum Replies Created
-
Forum: Plugins
In reply to: [Members - Membership & User Role Editor Plugin] No login buttonHi @corhsin
Can you provide more details about “Permission Denied” page you mentioned, perhaps send the URL and screenshots?
Best
I’m glad to hear that you have managed to resolve it.
BTW: I should mention that in my message but please never change the
wp_user_roles
option in the database. It’s a serialized array and it’s very easy to break it.Best
Hi @jmvdp
I’m sorry to hear you are experiencing an issue. You can try to follow the following steps to get access to all Admin permissions:
1. Create a new Administrator account for new user? If you don’t have access to WP Dashboard you should be able to do this by adding a record in the database.
2. Once it’s done you can log in to new Admin and edit your original profile. Double-check that you only have Administrator role in this profile and update that user.
3. Log into your original account and see if this issue persists. If it’s okay, you can delete that temporary Admin account.
4. If that does not help, please reach out to your host and check if they have database backup so you can revert the last changes. All permissions are stored in the wp_options table in wp_user_roles option. When you change permissions, they are save in the database so deactivating Members won’t revert back any permissions changes.Regarding the error, it might be related to this issue. Does it happen when you visit specific Members page or any Admin pages? The line in the log points to checking view param in the Members settings. Maybe you don’t have access to those settings.
Best
Forum: Plugins
In reply to: [Members - Membership & User Role Editor Plugin] No login buttonHi @corhsin
There is a shortcode [members_login_form] that you can paste on any page to display login form. We don’t have registration form, so you have to use another plugin.
Best
Hi @lemiran
In Members you can create roles for each user and play with permissions, but we don’t have any UI on Admin side to assign users to specific pages or categories.
Best
Forum: Plugins
In reply to: [Members - Membership & User Role Editor Plugin] Issue with role levelsCan you double-check that the Members – Role Hierarchy add-on is enabled in Members > Add-ons and then check that the Position of Store Manager that you can find in Members > Roles table is higher than the positions of copies of Customer role? If the position of Store Manager is higher then they should be able to promote users of lower roles.
Best
Forum: Plugins
In reply to: [Members - Membership & User Role Editor Plugin] Warning with WordPress 6.7Hi David,
Thank you for reporting this. Our developer will work on fixing this issue.
Best
Forum: Plugins
In reply to: [Members - Membership & User Role Editor Plugin] Update wp 6.7Thank you for reporting this issue. Our developers will review this and patch it soon.
Best
Hi @oneside
You can use this code and adjust it:
// Get current user's roles
$user = wp_get_current_user();
$user_roles = (array) $user->roles;
// Get roles assigned to page/post with ID - 123
$post_id = 123;
$page_roles = members_get_post_roles( $post_id );
// Set page as protected
$protected_page = true;
foreach($page_roles as $page_role) {
// Set page as not protected if user has role assigned to Content Permissions
if( in_array( $page_role, $user_roles ) ) {
$protected_page = false;
break;
}
}
if(! $protected_page) {
// Page is not protected for current user
}I hope that helps.
Members has Content Permissions feature that lets you protect pages and posts, but it doesn’t have tool to protect element on the page. To protect element like container you will need to use different plugin, for example MemberPress.
Best
Forum: Plugins
In reply to: [Members - Membership & User Role Editor Plugin] Export/Import SettingsHi @onsharp
There is no import/export tool. User role settings are stored in the wp_options table in option called wp_user_roles as serialized array so you can copy it to keep current user roles permissions.
Best
Hi @arjes
When you enable “Private site” feature in Members, not logged-in users will be redirected to wp-login.php page. After log in they will be sent directly to the page they were originally trying to access. I just tested it by going to one of the posts as not logged-in user. I was sent to wp-login.php page and once I logged in, it sent me to post.
If that does not work, please disable all plugins except Members and switch to default WP theme to see if it persists.
Best
Hi @skysolmedia
Can you please double-check that this issue is related to Members plugin as we haven’t had any reports about this issue? To do this, deactivate all plugins and then activate it one by one starting with Members to see if this issue persists.
Best
Hi @dr_jackass
To get all roles assigned to specific post/page you can use
members_get_post_roles
function that returns an array of roles assigned to post/page. Here is the code snippet that you can adjust:// Get current user's roles
$user = wp_get_current_user();
$user_roles = (array) $user->roles;
// Get roles assigned to page/post with ID - 123
$post_id = 123;
$page_roles = members_get_post_roles( $post_id );
// Set page as protected
$protected_page = true;
foreach($page_roles as $page_role) {
// Set page as not protected if user has role assigned to Content Permissions
if( in_array( $page_role, $user_roles ) ) {
$protected_page = false;
break;
}
}
if(! $protected_page) {
// Page is not protected for current user
}I hope that helps.
Hi @webgroup1
Please check Registering capabilities and Registering cap groups sections in our doc: https://members-plugin.com/docs/snippets/.
I hope that helps.