View Single Post
  #7  
Old 11-11-2019, 07:40 AM
 
Ed B. Ed B. is offline
 

X-Adept
  
Join Date: Apr 2016
Posts: 446
 

Default Re: Redirecting a customer to a custom page after login, depending on parameter

How the params are treated look extremely confusing to me (somehow the values of the array end up becoming keys going through some functions), but, does this really solve my problem? I can declare param like
Code:
protected $params = array('target','mode','param');
then I can only change this array within some functions, otherwise I get a syntax error ( unexpected '$params' (T_VARIABLE), expecting function (T_FUNCTION) or const (T_CONST))


and if I try to set the array directly like

Code:
protected $params = $this->getAllParams();
then I get
PHP Fatal error: Constant expression contains invalid operations

And, of course, if I play with $params etc. within my function loginBody(),
then I will have the same problem as before...
__________________
X-cart 5.2.12, php 5.6
Ed from Grenoble, France
Reply With Quote