markleary / grav-plugin-loginldap

Grav LoginLdap Plugin http://getgrav.org
MIT License
5 stars 4 forks source link

LoginLDAP plugin cannot work together with Admin plugin #8

Open aguvillalba opened 7 years ago

aguvillalba commented 7 years ago

Hi, First of all, thanks a lot for the plugin!

When trying to install LoginLDAP plugin from admin panel, I have this error: The Login plugin needs to be disabled.

// This plugin is meant to be used in place of Login plugin, Login should not be enabled
        if ($this->grav['config']->get('plugins.login.enabled')) {
            throw new \RuntimeException('The Login plugin needs to be disabled.');
        }

If I disable the login plugin, then I got this error: One of the required plugins is missing or not enabled

// Check for required plugins
        if (!$this->grav['config']->get('plugins.login.enabled') || !$this->grav['config']->get('plugins.form.enabled') || !$this->grav['config']->get('plugins.email.enabled')) {
            throw new \RuntimeException('One of the required plugins is missing or not enabled');
        }

In file /user/plugins/admin/admin.php

So, it's a deadlock! I cannot install LoginLdap but cannot disable Login either! In order to make it work, I had to hack the admin plugin to check for existence of login OR loginldap. Is there any way to make this work without hacking the admin plugin? Maybe for future versions? Thanks a lot for the plugin!

gitirabassi commented 7 years ago

https://github.com/getgrav/grav-plugin-admin/pull/1076

markleary commented 7 years ago

I commented here:

https://github.com/getgrav/grav-plugin-admin/pull/1076

Unfortunately, there does not seem to be a straightforward solution. I'll try to look into it when I get some time. It looks like combining @drymonsoon and @AdamEttenberger commits may work for now.

fedme commented 7 years ago

Any updates? I would love to see this happening!