Code Monkey home page Code Monkey logo

multiple-roles's People

Contributors

mahjouba91 avatar thomasfw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

multiple-roles's Issues

Call to undefined function debug()

Hello,

Just to inform you that when installing the plugin on my WordPress (v.4.7) I had an error exception.

Call to undefined function debug()
on multiple-roles\multiple-roles.php l.37

// For new user form (in Backoffice)
// In multisite, user_register hook is too early so wp_mu_activate_user add user role after
if ( is_multisite() ) {
//	add_filter( 'signup_user_meta',      array( $checklist, 'mu_add_roles_in_signup' ), 10, 4 ); // Waiting https://core.trac.wordpress.org/ticket/39223
	$bool = remove_action( 'wpmu_activate_user', 'add_new_user_to_blog', 10, 3 );
	debug( $bool );
	add_action( 'wpmu_activate_user',    array( $checklist, 'mu_add_roles_after_activation' ), 10, 3 );
} else {
	add_action( 'user_register',         array( $checklist, 'process_checklist' ) );
}

Removing the line debug( $bool ); fix the issue.

Thanks,

Guillaume

User Roles

I'm trying to use a front end form (Gravity Forms) to assign User Roles (multiple) to a new User Registration. I'm using a plugin called User Role Editor to create the User Roles and this plugin to allow for multiple roles per user. I'm using mu_add_roles_in_signup_meta within Gravity forms to try to assign the user roles for the user registration but it's not working. Any suggestions how I might be able to get this to work?

Problem with bbPress

Hello,

There is a problem with bbPress WordPress plugin (https://bbpress.org/) once your plugin is activated. Indeed, when you add a new WordPress role to the user, the bbPress role vanishes and it's impossible to set it again.

Use the 'promote_users' capability rather than 'edit_users'

Wordpress uses the promote_users cap to establish whether a user can change a user's role, not edit_users.

We have a Client role set up to provide clients with most user related admin capabilities, with the exception of the promote_users cap. This prevents them from creating any new administrator users, or accidentally promoting a regular user to an administrator etc.

With this plugin installed, users with the Client role are able to assign/revoke roles when they shouldn't be allowed to, because the plugin checks for the edit_users instead of promote_users (in MDMR_Model::can_update_roles())

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.