Cas attribute modification via hooks
-
Hi everyone!
Is there a possible way to modify a cas attribute using a custom plugin hook, right after the response xml is parsed and before the session or the database are populated with the cas returned attributes?
In my case the attribute for mail is multi-valued(i.e [[email protected], [email protected]]) and I want to keep only one of these values.
So far, I used the “wp_cassify_after_cas_authentication” hook to get the $cas_user_datas array. Inside the hook, I managed to overwrite the appropriate value into $cas_user_datas[ ‘mail’ ]. The problem is that I can’t figure out how to pass this to the main flow and finally populate the session(and database) with the desired value.
I tried to pass the $cas_user_datas array by reference and treat it like a “pointer” but the value didn’t change in the main routine(classes/wp_cassify_plugin.php). So, I believe that’s not the case.
Except for using hooks, is there a configuration(or some way) to get only one value from a multi-valued attribute and ignore the others?
Thanks,
K.K.
- The topic ‘Cas attribute modification via hooks’ is closed to new replies.