Title: role based features
Last modified: August 24, 2016

---

# role based features

 *  [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * (@justinticktock)
 * [11 years ago](https://wordpress.org/support/topic/role-based-features/)
 * Hi Jeff,
 * I’ve been thinking of putting a plugin together to do things like..
    -  Activate a plugin only if a particular role is currently assigned to any 
      logged in users. Some plugins I find are only required by one or 2 roles and
      this would help dynamically expand or collapse the necessary active plugins
      as required for the user base logged in.
    -  And for the adhoc plugins used by admins have a way to active a plugin for
      10min, 20min..1hours, before it automatically becomes in-active. This way 
      Admin type roles can activate a plugin for some temporary functionality knowing
      that they will not forget to disable it.
 * so before I continue to develop something just wondered if you had any such ideas
   for plugin-organizer’s roadmap.
 * ..Justin
 * [https://wordpress.org/plugins/plugin-organizer/](https://wordpress.org/plugins/plugin-organizer/)

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/role-based-features/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/role-based-features/page/2/?output_format=md)

 *  Plugin Author [Jeff Sterup](https://wordpress.org/support/users/foomagoo/)
 * (@foomagoo)
 * [11 years ago](https://wordpress.org/support/topic/role-based-features/#post-6136901)
 * That feature has been asked for and I’ve tried. Unfortunately users and roles
   don’t exist before plugins are loaded so there’s no way to do it.
 *  Thread Starter [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * (@justinticktock)
 * [11 years ago](https://wordpress.org/support/topic/role-based-features/#post-6136905)
 * Yes I see that, how about if on logging in a transient for each role is set for
   a time period before clearing. Then use this to activate a plugin or not?
 * so the code is not actually looking at the roles but the transients. the user
   will need to login and then on the next page refresh the plugins required for
   their role will then be available for a period of time.
 * ?
 *  Plugin Author [Jeff Sterup](https://wordpress.org/support/users/foomagoo/)
 * (@foomagoo)
 * [11 years ago](https://wordpress.org/support/topic/role-based-features/#post-6136943)
 * Actually I think I can make a transient work by using the logged in cookie to
   find the right one. I can store the users roles in that transient and then load
   plugins based on that. Great idea! Give me about a week to get it all working.
   It might be less if this week isn’t as busy as the last few.
 *  Thread Starter [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * (@justinticktock)
 * [11 years ago](https://wordpress.org/support/topic/role-based-features/#post-6136947)
 * Your saying that the whole collective of which roles are currently logged in 
   are spread over the user cookies, Sounds neat.
 * Adding it in it will really be a great way for removing even more plugin cluter
   and dynamically expand & collapse the active plugins.
 * Since you’d be adding possibility of increased occurrence for hidden plugin conflicts
   etc. Some sort of logging of who and which plugin was active would be a good 
   idea to help debug any issue.
 *  Plugin Author [Jeff Sterup](https://wordpress.org/support/users/foomagoo/)
 * (@foomagoo)
 * [11 years ago](https://wordpress.org/support/topic/role-based-features/#post-6136956)
 * I can save an array of the roles that a user belongs to in a transient and then
   use a value from the cookie’s that wordpress already uses to retrieve the correct
   set of roles. The only problem I’m running into so far is that each row in the
   database table has a unique identifier that is the post ID. To save a different
   set of plugins for each role I will need to save more than one entry for each
   post. I might be able to get past that but it will take some work.
 *  Plugin Author [Jeff Sterup](https://wordpress.org/support/users/foomagoo/)
 * (@foomagoo)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/role-based-features/#post-6137004)
 * I’m still working on this. It is looking good though. I have made serious changes
   to the plugin and I can now save a different set of plugins for each role. It
   still needs some work but it is getting there. I want to have it done by the 
   end of the week but I’m really busy this week and it may take a little longer.
   I’ll keep you posted.
 *  Thread Starter [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * (@justinticktock)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/role-based-features/#post-6137007)
 * Jeff thanks for the update if you need me to test anything let me know.
 *  Thread Starter [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * (@justinticktock)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/role-based-features/#post-6137049)
 * Hi Jeff just wondered if you managed to grab any more time for this?
 *  Plugin Author [Jeff Sterup](https://wordpress.org/support/users/foomagoo/)
 * (@foomagoo)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/role-based-features/#post-6137050)
 * It’s really close. Redoing the admin to get roles working wasn’t easy. I’m still
   having an issue prioritizing the roles because a user can have more than one 
   role and the admin can assign settings to the same url for more than one role.
   So I need to decide which set of plugins to use when more than one is found in
   the database. But I am able to have different plugins for different roles for
   global plugins and find parents with the same role or no role.
 *  Thread Starter [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * (@justinticktock)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/role-based-features/#post-6137051)
 * Ok that’s good to hear, let me know if I can help with any testing 🙂
 *  Plugin Author [Jeff Sterup](https://wordpress.org/support/users/foomagoo/)
 * (@foomagoo)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/role-based-features/#post-6137067)
 * I have a beta version ready for testing if you would like to test it. Make sure
   you aren’t testing it on a live site since this makes a lot of changes to Plugin
   Organizer. It allows disabling plugins based on role as well as other fixes and
   changes. Here is a link to the beta. [http://www.jsterup.com/wp-content/uploads/2015/07/plugin-organizer.7.b.1.zip](http://www.jsterup.com/wp-content/uploads/2015/07/plugin-organizer.7.b.1.zip)
 *  Thread Starter [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * (@justinticktock)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/role-based-features/#post-6137068)
 * That’s great, I’ll have a look and get back to you.
 *  Thread Starter [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * (@justinticktock)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/role-based-features/#post-6137069)
 * I’ve found the first hurdle…php error on saving Global Plugins..this was after
   it previously saved OK and then de-activating some plugins before attempting 
   to re-save a new Global Plugins. I’m assuming that de-activating the plugins 
   caused this issue..
 * I sent contact request in via [http://www.jsterup.com/](http://www.jsterup.com/)
   if you respond there we can use email.
 *  Thread Starter [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * (@justinticktock)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/role-based-features/#post-6137070)
 * also ….just to confirm my test environment..
    testing with 4.2.3 php 5.4.12 network
   install active local plugins = [https://wordpress.org/plugins/user-role-editor/](https://wordpress.org/plugins/user-role-editor/)
   [https://wordpress.org/plugins/role-based-help-notes/](https://wordpress.org/plugins/role-based-help-notes/)
 * network active plugins =
    [https://wordpress.org/plugins/query-monitor/](https://wordpress.org/plugins/query-monitor/)
   [https://wordpress.org/plugins/user-switching/](https://wordpress.org/plugins/user-switching/)
 *  Plugin Author [Jeff Sterup](https://wordpress.org/support/users/foomagoo/)
 * (@foomagoo)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/role-based-features/#post-6137071)
 * What is the php error you are getting?

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/role-based-features/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/role-based-features/page/2/?output_format=md)

The topic ‘role based features’ is closed to new replies.

 * ![](https://ps.w.org/plugin-organizer/assets/icon-256x256.png?rev=1786554)
 * [Plugin Organizer](https://wordpress.org/plugins/plugin-organizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/plugin-organizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/plugin-organizer/)
 * [Active Topics](https://wordpress.org/support/plugin/plugin-organizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/plugin-organizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/plugin-organizer/reviews/)

## Tags

 * [activate](https://wordpress.org/support/topic-tag/activate/)
 * [role](https://wordpress.org/support/topic-tag/role/)

 * 16 replies
 * 2 participants
 * Last reply from: [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/role-based-features/page/2/#post-6137072)
 * Status: not a support question