Is the above possible? I’d like to capture a $_SESSION value in the prehook and pass it to the posthook (in case it gets unset during login) ...
------
Server: *nix, ModX Evo 1.0.4, Apache 2.x, PHP 5.x, Mysql 5.x.
Set it as a hidden field in the form.
shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect |
github |
splittingred.com
Shaun, thanks for the reply. I should have qualified better what that value is: It’s a multidimensional array that I want to pass. Of course, that can’t be passed in a hidden field ... I could convert it to a json string, but if possible I’d rather not do two conversions to pass it through the form itself. Is there a way to "talk to" the Login object directly via the hooks?
------
Server: *nix, ModX Evo 1.0.4, Apache 2.x, PHP 5.x, Mysql 5.x.
Thanks for the lead. I’d like to use this method, but I keep getting an internal server error (caused by the call to cacheManager). Why might this happen?
------
Server: *nix, ModX Evo 1.0.4, Apache 2.x, PHP 5.x, Mysql 5.x.
Also, I’m experiencing the internal error when attempting to use postHooks (even with the posthook simply returning "TRUE"). Clues? ...
UPDATE: This appears to have been caused by an installation issue on the dev server. (The previous post still applies ... trying to utilize the cacheManager is a no-go so far.)
------
Server: *nix, ModX Evo 1.0.4, Apache 2.x, PHP 5.x, Mysql 5.x.