SocalNick/ScnSocialAuth — pull request #125 by matwright (2013-12-31 16:13:41+00:00)
Title: Fixed problem with setting Auth Adapter

Currently if any other module calls the AdapterChainFactory prior to ScnSocialAuth (for example BjyAuthorize) then the Auth Adapter defaults back to ZendDB.

See :

https://github.com/bjyoungblood/BjyAuthorize/issues/208

and

https://github.com/SocalNick/ScnSocialAuth/issues/123

To fix the issue I remove any previously attached listeners for authenticate and logout and replace with HybridAuth adapter instances for those events.

As a precaution I also reset the adapter on the zfcuser_auth_service.

The outcome is the same as the previous technique of settings the Module Options on the fly (in that we enforce te HydridAuth adapter exclusively). This will overwrite any previously configured adapters.

I have tested with BjyAuthorize.