e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
318 stars 212 forks source link

Add option to alt_auth plugin #5107

Closed Alex-e107nl closed 7 months ago

Alex-e107nl commented 7 months ago

Question

I would like to see the internal e107 database function as a secondary authorization type.

Expected Source

File e107_plugins/alt_auth/alt_auth_conf.php

line 185 of:

".$altAuthAdmin->alt_auth_get_dropdown('auth_method2', varset($pref['auth_method2']), 'none')." change to: ".$altAuthAdmin->alt_auth_get_dropdown('auth_method2', varset($pref['auth_method2']), 'e107')." ### Additional Context For a large website (2000+ members) I have an e107 cms which retrieves the login data from a separate database, so it only concerns a name and password, which are retrieved and imported with the alt_auth plugin. That works fine, but now my question is, if the password is changed in the external database, this does not happen in the data that has previously been retrieved for a member and so you have to delete the existing account so that the new data is imported again when that member logs in. I have tested and it turns out that if I use the external database as main and the internal e107 database as secondary, it works well, a password change is simply adopted! I just can't see what could possibly cause problems with this setup, but so far it's working fine, could this be changed in e107?
CaMer0n commented 7 months ago

Thanks @Alex-e107nl

I believe what you require is this option, correct?

image

I will add it. please let me know if it works for you.

Thanks.

Jimmi08 commented 7 months ago

Result for me with this change:

image

I was able to use only e107 + e107db combination in case like this (when active and primary db should be separate e107 database) and for failed actions using secondary authentication. If the user changes the password in e107db (external), then login in the actual site fails but secondary authentication is used and login is successful (at least nobody complained about this for now).

Change from Alex is the correct one, you will get e107 listed in the second authentication but updating the password from e107db as primary auth to actual e107 db is not supported (after successful login with e107db as primary). I suppose that this was what he was asking for. Maybe I am wrong.

Alex-e107nl commented 7 months ago

I have tested it, i can use the internal e107 database function as a secondary authorization now, the 2 e107 options in the Primary authorisation is a little confusing.... I use it like in this image now:

e107_auth_second

I can change the password in the otherdb and it also changes in the internal e107 database! Perfectly!

Moc commented 7 months ago

@Alex-e107nl Just a note for the future: for issues like these (and your newsfeed issue), where you are requesting new functionality or changes to existing functionality, please submit it as a "feature request" rather than a "question".

"Questions" are more used for things like "how do I use this functionality?" or "Can e107 do this or that?". Hopefully it makes sense when you see the issue templates. If not, let me know and we can make some adjustments.

Thanks! 👍

Alex-e107nl commented 7 months ago

Thank you Tijn, I will keep that in mind, I am very happy that Camer0n has adjusted it, and maybe others will find it useful too!