Happy new year.
It will be great if anyone provide me a solution about JRequest::getVar(). I know about the following. My question is for a specific problem.
Code: Select all
/**
* Fetches and returns a given variable.
*
* The default behaviour is fetching variables depending on the
* current request method: GET and HEAD will result in returning
* an entry from $_GET, POST and PUT will result in returning an
* entry from $_POST.
*
* You can force the source by setting the $hash parameter:
*
* post $_POST
* get $_GET
* files $_FILES
* cookie $_COOKIE
* env $_ENV
* server $_SERVER
* method via current $_SERVER['REQUEST_METHOD']
* default $_REQUEST
*
* @static
* @param string $name Variable name
* @param string $default Default value if the variable does not exist
* @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
* @param string $type Return type for the variable, for valid values see {@link JFilterInput::clean()}
* @param int $mask Filter mask for the variable
* @return mixed Requested variable
* @since 1.5
*/
function getVar($name, $default = null, $hash = 'default', $type = 'none', $mask = 0)
When I click log in(at top) it go to the joomla page with a redirectUrl variable looks like http://www.ukfixit.co.uk/?redirectUrl=h ... as%3D51247
I want to redirect to the page http%3A%2F%2Fcommunity.diyfixit.co.uk%2Fservice%2FdisplayHomePageExperience.kickAction%3Fpage%3DHomepage%26as%3D51247 in case of above variable(redirectUrl).
How can i get this variable(redirectUrl) from my com_user component? Using JRequest::getVar or other method exists?
I modify the controller.php as
Code: Select all
if ($return = JRequest::getVar('redirectUrl', '', 'method', 'base64')) {
$return = base64_decode($return);
Rashidul