About JRequest::getVar of com_user com for perfect redirect

This forum is for general questions about extensions for Joomla! version 1.5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
rashidul_buet
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sat Nov 01, 2008 2:27 am

About JRequest::getVar of com_user com for perfect redirect

Post by rashidul_buet » Tue Jan 06, 2009 5:02 pm

:( Hi Everyone,

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)
My problem is I m in http://community.diyfixit.co.uk/service ... e&as=51247 .
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);
Best Regards,
Rashidul :eek:

Locked

Return to “Extensions for Joomla! 1.5”