Support Forum
I use SP on a WP install with SSO implemented using open source CAS JASIG solution and its PHP CAS client.
When user logs into WP/SP, login credentials are checked by the SSO solution which is configured to use a custom database.
This database also holds email addresses. The SSO solution is only used to check login credentials. It does not allow me to get the email address. But as I manage the database, I can get the user email address with a secured web service I can call in PHP.
Email adresses are used by SP to notify users from answers to their posts, which is very useful.
I would like to change the code is SP which is used to get user email adress. I would like to get it from my database instead of WP database, so that email address will always be right as it is maintained in this database.
Just tell me which file(s) I need to change. Thanks in advance.
Unbelievably we have filters just about everywhere in the code but NOT on the users email address! And really - rather than just saying hack the code I would much prefer to put a filter in place you could use - it's not even too late to get that into the 5.2 release. At least by doing that you would not need to hack core code and would be protected from losing it on future upgrades.
So how about we put a filter in the subscriptions code and then I tell you name for the filer so you can out it in place and wrote your code and then when we release the next update it will still work?
YELLOW
SWORDFISH
|
Not sure to understand everything in your answer as english is not my native language, so let's rephrase it to be sure.
I understand you can provide a clean way to do what I want using "filter" and you could give me the code of this filter in a "5.2 subscription".
Where can I find the documentation to use filter ? In your codex ?
When will you be able to give me access to this code ? I can wait days but not weeks.
Well the fist place to look for documentation would be here - http://codex.wordpress.org/Plugin_API - as filters are a WordPress construct.
Basically it means you write a small function outside of SP and we provide the filter which can call your code and pass any information you need to manipulate - in this case, perhaps, the users ID and stored email address.
You then take that ID and your code does what it needs to do and returns the email address you want to be used.
The beauty of this is that there is NO core code changes to anything which also means that you can continue to update SP safely.
As I said - we do not currently have a filter on the email address being used but I can add one a any time enabling you to add it to SP code AND wrote your filter code and start using it straight away.
have a look at the documentation and let me know if you want us to do this.
YELLOW
SWORDFISH
|
1 Guest(s)