Hi,
Great plugin, has been very useful thanks. One minor issue we have noted though, when using Elementor page builder and the custom user roles plugin, if trying to save a page with an elementor custom code block (for example, with a snippet of javascript) we get a 403 error. We have tested the different permissions under the role editor and have traced it back specifically to ‘delete users’ (which seems to be a strange thing for this issue to be linked to). Currently using WordPress 6.7, Elementor free 3.25.8 and Elementor Pro 3.25.3 (all latest). Within the custom role, I have been through enabling/disabling all of the options that we did not originally enable and can confirm ‘delete users’ being disabled is what causes the error 403 when saving pages that use the Elementor custom code widget. Any ideas?
Many thanks in advance
]]>Hi there,
User switching is throwing a fatal error:
Got error 'PHP message: PHP Fatal error: Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given in /home/mysite-2023/webapps/mysite/wp-content/plugins/wpfront-user-role-editor-personal-pro/includes/users/class-user-switching.php:530\nStack trace:\n#0 /home/mysite-2023/webapps/mysite/wp-content/plugins/wpfront-user-role-editor-personal-pro/includes/users/class-user-switching.php(530): method_exists()\n#1 /home/mysite-2023/webapps/mysite/wp-content/plugins/wpfront-user-role-editor-personal-pro/includes/users/class-user-switching.php(244): WPFront\URE\User_Switching\WPFront_User_Role_Editor_User_Switching->forget_woocommerce_session()\n#2 /home/mysite-2023/webapps/mysite/wp-includes/class-wp-hook.php(324): WPFront\URE\User_Switching\WPFront_User_Role_Editor_User_Switching->switch_user()\n#3 /home/mysite-2023/webapps/mysite/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()\n#4 /home/docns…', revoke_role_2
Looks like the same error as this thread > https://www.ads-software.com/support/topic/error-when-selecting-user-to-switch-2/
Also in this thread it was discussed about being able to remove the User Switching option > https://www.ads-software.com/support/topic/hide-or-remove-user-switching-option-inside-edit-user/
The issue with the solution provided here is that you cannot edit the Administrator permissions, so it can’t be disabled for the admin. It would be great to be able to disable this globally, as it breaks the functionality of other user switching plugins, making user switching impossible for admins.
]]>Hi,
how can I hook to add a role to a user in WP? I tried this but won’t work:
// Get the user object
$user = new WP_User($user_id);
// Add the additional role ‘my_user_role’
$user->add_role(‘my_user_role’);
Best,
Christian
For all users with permission to write posts, including the administrator, a section appears in the editor that says:
—–
Role Permissions – Upgrade to PRO – Help
Login is required to access this post
Manage access by user roles
——
This option can be disabled from the view from screen options, but you have to do it for each user and it is somewhat annoying.
I have tried to uninstall the plugin, activating the option to delete all data when uninstalling, but when I re-activate it, that option appears for all users. Thanks a lot in advance!
]]>Until today, and due to a bug in my WordPress unrelated to this plugin, the contributor role used to be able to “send posts for review” by simply having the “Create posts” box checked, with the “Publish posts” box disabled. Now, if I disable the “Publish posts” box, the option to write posts does not appear at all, and it throws them to the main menu.
I have tried to restore permissions for all roles, but it does not work. I have also installed other role plugins (I temporarily disabled WPFront User Role Editor, my plugin for managing roles for many years) just to try to restore permissions, but the option still does not appear.
]]>Hello,
We are facing some issues with a site that appears to be a general WooCommerce problem. The problem is that you can not edit the Privacy Policy page if you are logged in as shop manager and I would like to ask if the plugin has a feature to edit the shop manager role and allow this role to edit this page.
Thanks!
]]>WordPress version 6.4.4Active theme: Terra Hub Theme (version 1.4.8)Current plugin: WPFront User Role Editor (version 4.1.1)PHP version 8.1.29Error Details=============An error of type E_ERROR was caused in line 530 of the file /usr/www/users/terrarksrd/wp-content/plugins/wpfront-user-role-editor/includes/users/class-user-switching.php. Error message: Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given in /usr/www/users/terrarksrd/wp-content/plugins/wpfront-user-role-editor/includes/users/class-user-switching.php:530Stack trace:#0 /usr/www/users/terrarksrd/wp-content/plugins/wpfront-user-role-editor/includes/users/class-user-switching.php(530): method_exists(NULL, 'forget_session')#1 /usr/www/users/terrarksrd/wp-content/plugins/wpfront-user-role-editor/includes/users/class-user-switching.php(244): WPFront\URE\User_Switching\WPFront_User_Role_Editor_User_Switching->forget_woocommerce_session()#2 /usr/www/users/terrarksrd/wp-includes/class-wp-hook.php(324): WPFront\URE\User_Switching\WPFront_User_Role_Editor_User_Switching->switch_user('')#3 /usr/www/users/terrarksrd/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)#4 /usr/www/users/terrarksrd/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#5 /usr/www/users/terrarksrd/wp-settings.php(643): do_action('init')#6 /usr/www/users/terrarksrd/wp-config.php(108): require_once('/usr/www/users/...')#7 /usr/www/users/terrarksrd/wp-load.php(50): require_once('/usr/www/users/...')#8 /usr/www/users/terrarksrd/wp-admin/admin.php(34): require_once('/usr/www/users/...')#9 /usr/www/users/terrarksrd/wp-admin/users.php(11): require_once('/usr/www/users/...')#10 {main} thrown
]]>
Hi, Is there a way to either Hide or Remove User Switching option inside Edit User.
Regards
]]>Hello,
I’m getting this error on my server logs:
AH01071: Got error 'PHP message: PHP Warning: Array to string conversion in .../www/wp-content/plugins/wpfront-user-role-editor/includes/comments/class-comment-capabilities.php on line 168
I’m using version 4.1 of the plugin, WP version 6.4.4 and PHP 8.0.
Thanks for any help.
]]>Hi,
On the edit user page, I have secondary roles dispalying with checkboxes. Roles are created based on the prdocuts, so is there way to group those roles on edit user page based on product category?
Let me know.
Thanks
]]>Nomatter what I do new users are assigned to the role “subscriber”. Settings>General and “New user default roles” does nothing.
After trying to assign the subscriber role “author” role privileges with another plugin (it did not fix the problem – the problem is that site only load all options for “authors” (it works fine if I set the role to author), I removed the subscriber role using WPFront User Role Editor, but then new users were assigned “no role”.
When I set a secondary role under Settings>General and save, I get the message “saved” but when I go back and check, the secondary role I selected remain unchecked.
El motivo de que quiera hacer esto es que necesito que cualquier usuario (independientemente de su rol o condición) pueda verificar su correo electrónico con el enlace de verificación. Este enlace lo genera automáticamente la acción de “verificación” de JetFormBuilder, de Crocoblock. En principio, nos dimos cuenta que este “enlace de verificación de la cuenta” solo funcionaba cuando se abría desde un usuario con el rol de administrados, el cual tiene todos los permisos. Por ello, hemos otorgado el permiso de “Edit_users” a todos los roles de los usuarios de nuestro sitio (para que, durante el registro, puedan verificar su usuario). El problema es que, como explico durante las preguntas, no se si dar la capacidad de “edit_users” a los clientes de mi sitio podría provocar alguna vulnerabilidad en mi sitio (a pesar de que limite el acceso Read y Edit_dashboard).
Estos son los apartados que comento:
No se si me he explicado bien, espero que puedan ayudarme, estoy abierto a cualquier sugerencia.
]]>Explico mi problema… no nos funcionaba la acción de “verificación del correo electrónico” en el formulario de registro y, ahora, nos hemos dado cuenta de que posiblemente es un error que venía de las restricciones y permisos que tenía el usuario (por su rol). Con esto es que hemos habilitado que los usuarios recién registrados (rol: suscriptor) tengan permisos para “editar usuarios”, pero manteniendo los ajustes de “read”; es decir, sin darle acceso al “dashboard (lo hemos hecho con el plugin de “WPFront User Role Editor”). De esta manera, ahora ya funciona la verificación del correo. Entonces NUESTRO PROBLEMA es… desde que le hemos dado este permiso a los usuarios para poder “editar usuarios”, les aparece un acceso al panel de edición de WordPress en el margen superior. Y no solo eso, los nuevos usuarios tienen además acceso a los ajustes generales y la mayoría de apartados, por lo que podrían hasta “eliminar el sitio permanentemente”, pero yo no les he dado este tipo de permisos.
Además… tengo dos roles creados, el de “suscriptor” y el de “rol_verificado” (una copia del “customer” por defecto). Concretamente, cuando un usuario se registra lo hace como suscriptor y, junto a la acción de verificación, hemos a?adido una automatización para que se conviertan en “rol_verificado”. Con esto quiero decir que, extra?amente, no son solo los roles suscriptores quienes tienen acceso a estos apartados, sino que los usuarios verificados también (los cuales ni siquiera tienen el permiso mencionado de “editar usuarios”). Este es un usuario de “cliente” por defecto!
La barra del margen superior con el acceso a la edición de WordPress a la que me refiero es la que muestro en la siguiente captura de pantalla…
PD: comparto una imagen con el plugin (WPFront User Role Editor) y con el permiso (editar usuarios) mencionado en la explicación, marcados en rojo… este permiso (editar usuarios) es el que he activado en los usuarios con “rol: suscriptor”. La captura anterior de la página publicada, en cambio, es de un usuario con el “rol verificado” (es decir, con un rol de cliente, sin permisos adicionales)
A qué creen que se puede deber esto y cómo podría arreglarlo?
]]>We have a custom Shop Manager role set up in WPFront. In any Woocommerce order, there is a link to Profile on the order page (in the order details section, directly above the selected customer dropdown), which gives access to that user’s data, including the ability to reset the user’s password. Is there a Capability that we can turn off to prevent access to the Profile by our custom Shop Managers? Thanks.
]]>I saw that someone else logged this error over 9 montsh aga. On php 7.4 when debugging the site I get the error:
Attempt to assign property 'type' of non-object
wp-content/plugins/wpfront-user-role-editor/includes/widget/class-widget-permissions.php:112
WPFront\U\W\WPFront_User_Role_Editor_Widget_Permissions->get_meta_data()
wp-content/plugins/wpfront-user-role-editor/includes/widget/class-widget-permissions.php:230
WPFront\U\W\WPFront_User_Role_Editor_Widget_Permissions->widget_display_callback()
wp-includes/class-wp-hook.php:324
apply_filters('widget_display_callback')
wp-includes/class-wp-widget.php:383
WP_Widget->display_callback()
wp-includes/widgets.php:837
dynamic_sidebar('footer-widget-6')
wp-content/themes/astra/inc/markup-extras.php:1610
astra_get_sidebar()
wp-content/plugins/astra-addon/classes/class-astra-builder.php:364
Astra_Builder->render_footer_dynamic_components()
wp-includes/class-wp-hook.php:324
do_action('astra_render_footer_components')
wp-content/themes/astra/template-parts/footer/builder/components.php:159
load_template('wp-content/themes/astra/template-parts/footer/builder/components.php')
wp-includes/template.php:725
locate_template()
wp-includes/general-template.php:206
get_template_part('template-parts/footer/builder/components','')
wp-content/themes/astra/inc/core/builder/class-astra-builder-helper.php:932
Astra_Builder_Helper::render_builder_markup()
wp-content/themes/astra/inc/builder/markup/class-astra-builder-footer.php:220
Astra_Builder_Footer->render_column()
wp-includes/class-wp-hook.php:324
do_action('astra_render_footer_column')
wp-content/themes/astra/template-parts/footer/builder/footer-row.php:61
load_template('wp-content/themes/astra/template-parts/footer/builder/footer-row.php')
wp-includes/template.php:725
locate_template()
wp-includes/general-template.php:206
get_template_part('template-parts/footer/builder/footer','row')
wp-content/themes/astra/inc/builder/markup/class-astra-builder-footer.php:179
Astra_Builder_Footer->primary_footer()
wp-includes/class-wp-hook.php:324
do_action('astra_primary_footer')
wp-content/themes/astra/template-parts/footer/builder/desktop-builder-layout.php:37
load_template('wp-content/themes/astra/template-parts/footer/builder/desktop-builder-layout.php')
wp-includes/template.php:725
locate_template()
wp-includes/general-template.php:206
get_template_part('template-parts/footer/builder/desktop-builder-layout')
wp-content/themes/astra/inc/builder/markup/class-astra-builder-footer.php:142
Astra_Builder_Footer->footer_markup()
wp-includes/class-wp-hook.php:324
do_action('astra_footer')
wp-content/themes/astra/inc/core/theme-hooks.php:387
astra_footer()
wp-content/themes/astra/footer.php:26
load_template('wp-content/themes/astra/footer.php')
wp-includes/template.php:725
locate_template()
wp-includes/general-template.php:92
get_footer()
wp-content/themes/astra/page.php:44
In php 8 it crashes the site. I knopw you answered over 9 months agao saying it will be fixed, but is it still pending?
]]>Hi, I installed your great plugin to permit a user to see only the post menu, but, event I set only the post settings, I can still view the Elementor Template menu, the contact form 7 menus….and tools menu… how can I leave only the posts and profile menu?
You can see here the image I see
thank you
]]>Hi,
How do I assign levels to roles that have been created?
]]>Warning: Attempt to assign property ‘type’ of non-object in /homepages/20/d783882188/htdocs/comptoir-creole-boutique/wp-content/plugins/wpfront-user-role-editor/includes/widget/class-widget-permissions.php on line 112
Warning: Attempt to assign property ‘type’ of non-object in?/homepages/20/d783882188/htdocs/comptoir-creole-boutique/wp-content/plugins/wpfront-user-role-editor/includes/widget/class-widget-permissions.php?on line?122
WordPress : 6.1.1
Wp front user role editor : 3.2.1.11184
]]>Hello,
I’m using the paid version of your plugin, I need to totally disable the secondary roles and all the functions related to it because the secondary roles create a problem with the assignment of the roles of the woocommerce membership plugin.
Is there any way to do this?
Can you suggest a custom code?
Thank you
This seems to be a new issue, as I have never experienced this before using the plugin.
Bit of background, I have a role called ‘Site editor’. These users can create, delete and edit posts, pages, events and other listings (the events and listings post types are powered by two different plugins).
Only recently, these users could no longer view all posts, events and listings within WP dashboard and just displayed: “There has been a critical error on this website…”
I managed to fix viewing all posts by ticking an option called ‘vc_access_rules_post_types/post’. However, all other post types still receive the same error. However, there are no options for ticking the other post types.
This has never happened on the previous version I was running, I believe that may have been before 3.0.0.
Could you help?
WP version: 6.0
User roles: 3.2.1.11184
I have a site where you need to have an account to view a certain page which shows all of a users posts. I would like that user to be able to add another user that could see their posts – is this possible?
]]>Hi,
It doesn’t appear that this plugin is compatible with php 8.1 ie
[03-Aug-2022 22:29:06 UTC] PHP Warning: Attempt to read property "type" on array in ...wp-content\plugins\wpfront-user-role-editor\includes\widget\class-widget-permissions.php on line 112
[03-Aug-2022 22:29:06 UTC] PHP Fatal error: Uncaught Error: Attempt to assign property "type" on array in ...\wp-content\plugins\wpfront-user-role-editor\includes\widget\class-widget-permissions.php:112
Stack trace:
#0 ...\wp-content\plugins\wpfront-user-role-editor\includes\widget\class-widget-permissions.php(230): WPFront\URE\Widget\WPFront_User_Role_Editor_Widget_Permissions->get_meta_data(Array)
Given that php 7.4 is EOL in November this year and and php 8.0 is end of active support in November this year, when can we expect a fix for this, especially given that requests for fixes to this line of code have been ongoing for over a year ie https://www.ads-software.com/support/topic/problem-with-php-8-4/ and
https://www.ads-software.com/support/topic/php-warning-attempt-to-assign-property-type-of-non-object/
Thanks
Janette
Hello,
I want to activate the Admin manage_options only for a specific plugin, for the Shop Manager role.
Is there any way to do this ?
Adding some filter or action to function.php?
or how?
Thanks
]]>Hi,
This is a question about User Role Editor Plugin.
I am looking for support to allow parents with multiple children accounts to view course results together. Thanks in advance.
This seems to be a powerful tool.
Our use case is as follows..
Imagine 2 siblings attend the same course, we are working towards the parent being able to see both childrens’ uploaded results in one place without having to log in twice to compare the results.
Do you think I could achieve this with wpfront-user-role-editor?
Bw,
Ben
The plugin seems incompatible with PHP 8:
Uncaught Error: Attempt to assign property “type” on array in …/wp-content/plugins/wpfront-user-role-editor/includes/widget/class-widget-permissions.php:112
It may be time to test and fix ??
]]>I encountered this warning:
llegal string offset ‘singular_name’ in \wp-content\plugins\wpfront-user-role-editor\includes\post-type\class-post-type.php:215
I looked to see why this was happening.
To do so, I looked at what $this->post_type_args[$post_type] looks like.
This is what I got:
array (
'label' => 'Vc Templates',
'public' => false,
'publicly_queryable' => false,
'exclude_from_search' => false,
'show_ui' => false,
'show_in_menu' => false,
'menu_position' => 10,
'menu_icon' => 'dashicons-admin-page',
'hierarchical' => false,
'taxonomies' =>
array (
),
'has_archive' => false,
'rewrite' => false,
'query_var' => false,
'show_in_nav_menus' => false,
)
This post type is registered by the WPBakery Pagebuilder.
This appears to be the same data passed to the register_post_type function in /plugins/js_composer/include/classes/core/shared-templates/class-vc-shared-templates.php:150ff
Since the “labels” key is optional and so is its descendant “singular_name”, PHP has to create new entries and that seems to cause the warning.
I have changed the function as follows:
/**
* Fetches the singular name after registration if it does not exist. WP does not supply it as part of the arguments.
*
* @param type $post_type
* * @param type $post_type_object
* @return type
*/
public function registered_post_type($post_type, $post_type_object) {
if (empty($this->post_type_args[$post_type])) {
return;
}
if (!empty($this->post_type_args[$post_type]['labels']['singular_name'])) {
return;
}
else{
$this->post_type_args[$post_type] = ['labels' => ['singular_name' => $post_type_object->labels->singular_name]];
}
Now the warning is gone and everything runs smoothly on my development system.
However, since my change would be overwritten in the next update of your plugin, I would like to ask you to check the problem and use the code I provided if necessary.
Kind regards
Alexander Behling
]]>Hi! I have activated the plugin and I get this message.
Cannot use object of type stdClass as array in /homepages/34/d774441124/htdocs/mydomain/wp-content/plugins/wpfront-user-role-editor/includes/post-type/class-post-type.php:210 Stack trace: #0 /homepages/34/d774441124/htdocs/mydomain/wp-includes/class-wp-hook.php(307): WPFront\URE\Post_Type\WPFront_User_Role_Editor_Post_Type->registered_post_type(‘sfwd-courses’, Object(WP_Post_Type)) #1 /homepages/34/d774441124/htdocs/mydomain/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(”, Array) #2 /homepages/34/d774441124/htdocs/mydomain/wp-includes/plugin.php(474): WP_Hook->do_action(Array) #3 /homepages/34/d774441124/htdocs/mydomain/wp-includes/post.php(1708): do_action(‘registered_post…’, ‘sfwd-courses’, Object(WP_Post_Type)) #4 /homepages/34/d774441124/htdocs/mydomain/wp-content/plugins/sfwd-lms/includes/class-ld-lms.php(382): register_post_type(‘sfwd-courses’, Object(WP_Post_Type)) #5 /homepages/34/d774441124/htdocs/mydomain/wp-includes/cl in /homepages/34/d774441124/htdocs/mydomain/wp-content/plugins/wpfront-user-role-editor/includes/post-type/class-post-type.php on line 210
]]>Media roles do not work. I saw that the role of the participant manager can delete pictures from the general gallery of media files. Although there was no check mark for deletion. I generally unchecked all the checkboxes, but access to media files and their deletion also remained. Although other prohibitions/permissions work.
Screenshots:
https://ibb.co/m0rtB5t
https://ibb.co/DLX6MTL
UPDATE:
The problem was solved. Perhaps someone will help. In the “User” settings there is an item “Assign roles”. And in Assign roles “Secondary Roles: Author” was specified. I unchecked the box and everything worked as it should.
Hello,
There are two warnings :
Warning: Attempt to assign property ‘type’ of non-object in /xxx/wp-content/plugins/wpfront-user-role-editor/includes/widget/class-widget-permissions.php on line 112
Warning: Attempt to assign property ‘type’ of non-object in /xxx/wp-content/plugins/wpfront-user-role-editor/includes/widget/class-widget-permissions.php on line 122
with WordPress 5.9.2, PHP 7.3.33, WPFront User Role Editor Version 3.2.1.11184
Thanks for help or correction !
Isabelle
Which MySQL database table holds the roles information?
I need to copy the roles, from my old site to a newly created site.