Joachim Jensen
Forum Replies Created
-
Thank you for reporting this and for providing all the details! It has been resolved in the latest version.
Thank you for reporting this.
Would it be possible to provide the names of all other active plugins on your site? I suspect there may be something that’s interfering with the database queries used to fetch members.
Currently it is intended that the
register_toparameter doesn’t contain the full URL, as it has only been designed to work with the shortcode[login-form].There is not a way right now to change that behavior, but I will try to take a look at Pie Register pro plugin and see if I can make the 2 plugins work together; unfortunately I cannot give an ETA of when that will be done.
The
has_level()method is a misnomer when it comes to Trait automators, because it only looks at levels that have specifically been given to the user.So in your use case, the
get_level_ids()is the way to go.In the future I will probably combine these 2 methods into something that’s simpler to use as I acknowledge that is a bit confusing.
I am glad to hear the issue was resolved.
For full transparency, once Restrict User Access is deactivated, it leaves no trace and all restricted content will become fully accessible again. E.g. it does not alter User Roles or Capabilities, and it doesn’t make changes to .htaccess or any other core files.
Currently this is not supported, but similar functionality has been requested before. The WooCommerce automator included in the plugin makes it possible to grant access based on a product purchase, not variations of a product.
I will see if this is something that can be added in the future
Thank you for reporting this.
Are you using another plugin to display login forms, e.g. what is the name of the registration plugin you mention?
This could be the issue as the “redirect_to” parameter may then not be handled properly, as opposed to using the basic
[login-form]shortcode.Thank you for reporting this.
Are you by any chance using automators in your levels?
Can you see if this snippet works for you:
if(in_array(398, rua_get_user()->get_level_ids())) { ?>
<p>authorized</p>
<?php } else { ?>
<p>not authorized</p>
<?php } ?>Thank you for reporting this. Currently the plugin does not support restricting menu items built in the new editor. It is on the roadmap.
Would it be possible to share a snippet of how you are trying to log levels? As well as where, ie. what hook/theme file/functions.php?
Yes it is correct that since version 2.6, parts of the REST API will automatically be restricted to users with lower permissions. To disable this, go to User Access -> Settings in the Admin Area, find the setting “REST API Content Protection” and toggle it off.
Would it be possible to share more about your use case, ie. what parts of the REST API are you expecting to be available to all users by default? I want to see if it’s possible to tweak the functionality such that you can keep the setting on without it causing conflicts.
Hi
When Content Aware Sidebars is uninstalled, the plugin will automatically cleanup after itself and delete all data. In the case there is leftover data, you want to look at the
poststable in the database wherepost_type=sidebar.However, deactivating the plugin should be enough to resolve any conflicts, as the widget areas created by it will then be unregistered. Content Aware Sidebars does not make any changes to themes or widget areas created with other plugins.
Hi,
The automator should handle membership extensions out of the box, i.e. if it’s triggered for a user that is already a member (whether active or expired), their membership will be extended/renewed by the set level duration.
Would it be possible to share some more details about how you test purchases in WooCommerce? Then I will see if I can reproduce the problem.
Hi,
Would something like this work for you?
rua_get_level($level_id)->get_title()If you are looking for the actual name/slug, and not the title, that is not currently possible via the RUA API, but I can see how that could be useful.
Since Access Levels are stored as custom post types, you could do this for now:
get_post($level_id)->post_nameApologies for the delayed response here. I was able to reproduce the problem you are experiencing, and I will include a fix for it in the next version.
In the meantime, adding this to your theme’s
functions.phpshould stop redirecting users to the admin area if they don’t have access to it:add_filter( 'login_redirect', function($redirect_to, $requested_redirect_to, $user ) {
$intercept = empty($redirect_to) || mb_strpos($redirect_to, 'wp-admin') !== false;
if(!$intercept) {
return $redirect_to;
}
if(!function_exists('rua_get_user')) {
return $redirect_to;
}
$rua_user = rua_get_user($user);
if ($rua_user->has_global_access()) {
return $redirect_to;
}
$user_levels = $rua_user->get_level_ids();
if (empty($user_levels)) {
return $redirect_to;
}
$metadata = RUA_App::instance()->level_manager->metadata()->get('admin_access');
foreach ($user_levels as $level_id) {
if ($metadata->get_data($level_id, true)) {
return $redirect_to;
}
}
return home_url();
}, 10, 3);Thank you for reporting this.
Are you using any other plugins to manage memberships, restrict access, or redirect logins?
Specifically, can you provide some more details about how you are doing this:
we’ve hidden the WordPress dashboard from members.
E.g. are you using the “Deny Access to Admin Area” option for one or more of your Access Levels?