• Hello, I hope you are well…

    This is a question I’ve been meaning to ask you for a long time.

    Do you think there is a way for Plugin Organizer to load specific plugins for logged-in or logged out users only?

    For example I wish to not have “Ultimate Member” that I’m using, been loaded in the homepage for visitors who do not have accounts since it’s a bit of a recourse hog plugin, and load it only after members log in.

    Do you think something like this could be achieved in any way?

    Please let me know.
    Thanks!

    EDIT: I just stumbled upon this: https://besuperfly.com/disabling-plugin-when-user-logged-in/
    I need it the other way around though. What do you think?

    • This topic was modified 9 years, 3 months ago by catmaniax.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Jeff Sterup

    (@foomagoo)

    Using pluggable.php is not recommended. I can’t determine if a user is logged in or not reliably within the mu plugin since the user objects haven’t been created and can rely on plugin functionality to be built properly. I tried to do something with users and roles about a year ago and it just caused all sorts of issues.

    Thread Starter catmaniax

    (@catmaniax)

    Thanks for the reply.

    I see, so there is no “easy” way for this to happen, bummer 🙁

    Plugin Author Jeff Sterup

    (@foomagoo)

    I will give it another shot. I was able to determine if a person was logged in using a transient. But it wasn’t 100% reliable. And the roles presented a problem.

    Thread Starter catmaniax

    (@catmaniax)

    Ok, please let me know if you sort it out at some point!
    Thanks again.

    Plugin Author Jeff Sterup

    (@foomagoo)

    I’ve been working on a new version that uses a cookie to keep track of whether a user is logged in and what roles they have. It’s nowhere near ready. And I’m not sure if it will work out in the end. But I am working on it.

    Thread Starter catmaniax

    (@catmaniax)

    I see. It will be really great if it works at some point!

    Thanks for letting me know.

    Plugin Author Jeff Sterup

    (@foomagoo)

    Update: I’ve got a working version on my test site that allows you to disable plugins based on being logged in and the roles your users have. It is close to being ready for release. I’m having issues coming up with a good way to display which roles have the plugin disabled on the main plugin list to the left when you are editing a post. Since there could be any number of roles. My test site has 23 different roles. So I can’t just use the mobile and standard indicators that are used on version 8. Once I get that figured out I think it is ready to go.

    Thread Starter catmaniax

    (@catmaniax)

    Wow, this feature will skyrocket Plugin Organizer if it’s working properly, I’m sure of it.

    I wish I knew programming so I could help you!

    Plugin Author Jeff Sterup

    (@foomagoo)

    Yes. I’m about ready to release the next version. Had some work projects take all of my time for awhile. And they take precedence since they pay me. Lol. But I finally got everything worked out I think. A little more testing and it should be ready. Probably will be released in the next couple of days.

    Thread Starter catmaniax

    (@catmaniax)

    That’s awesome news, I can’t wait to try it out!

    Plugin Author Jeff Sterup

    (@foomagoo)

    I just released version 9.0. After you install it you will be able to disable plugins based on whether a user is logged in or not. You will also be able to disable plugins based on the role the user has. To enable the feature go to the settings page and turn on Disable Plugins By Role.

    Thread Starter catmaniax

    (@catmaniax)

    That’s awesome news Jeff!

    I’ll test it out and let you know 😀

    Can this functionality be done only on specific pages and posts also?

    • This reply was modified 9 years ago by catmaniax.
Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Load plugins for logged-in users only?’ is closed to new replies.