New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New hook needed for UsersManager #2275
Comments
as this is specific to your app, we are happy to do it, but are you able to submit a patch & test it for this new feature? |
I'm happy too to do it and will submit it for test once finished.. But it should be noted that your description for the Login plugin as "Can be easily replaced to introduce a new Authentication mechanism" is a bit misleading till this moment. |
Attachment: plugins/UsersManager/API.php |
I attached the API.php file with modifications needed to make the UsersManager overridable. |
Will this work as well?
If you confirm this works with your plugin I can commit |
Attachment: Tested |
instead please refer to API.2.php attached here is an example: Register listener for some early hook like FrontController.initAuthenticationObject
the method Piwik_MyCustomUsersManager_API::getInstance() merely returns an instance of its class, which has methods overriden such as getUser and getUserByEmail etc... that looks inside other tables/data sources for users, instead of Piwik users table |
(In [4434]) Fixes #2275 Thanks rahman for feedback! |
velkommen |
I'm looking forward to participating more. You can assign me tasks regarding Piwik bugs fixes/feature requests. |
rahman, it is better if you grab the tasks that are interesting to you! we also look forward to seeing more patches |
Okay, I will search the timeline for tasks. I'm kinda new to this so not sure how I will occasionally declare undertaking a request to avoid duplicate work with other developers. |
in general, it is safe to work on any ticket unless
Best to ask questions etc. No need to say "I'm going to work on this" because as we've seen in the past, most people who say that don't end up working on it so then it creates confusion ;) |
Following the same technique used with the Login plugin - which set's the Zend::Registry('auth') to an instance of the Login class - the same is also needed for the UsersManager, and then the instance stored in Zend::Registry should replace the static method UsersManger::get_instance called from the Piwik_UsersManager_Controller.
The reason is found here in summary: http://forum.piwik.org/read.php?3,74485,74594#msg-74591
Keywords: hooks UsersManager thirdparty-plugin-development
The text was updated successfully, but these errors were encountered: