(1.3.9) Redirect custom login page

Phoca Download - download manager
kitty
Phoca Member
Phoca Member
Posts: 13
Joined: 31 Aug 2009, 12:25

(1.3.9) Redirect custom login page

Post by kitty »

Hi:

i need to redirect to my custom login page instead of default login. I am using YooLogin extension

My login page is in this article (i am using yoologin):
index.php?option=com_content&view=article&id=999

I have tried to replace this :

Code: Select all

$returnUrl  	= 'index.php?option=com_user&view=login&return='.base64_encode($return);
for this:

Code: Select all

$returnUrl  = 'index.php?option=com_content&view=article&id=999&return='.base64_encode($return);
I have tried but not returns to phocadownload previous page.

any idea?

code version 1.3.9 (components/com_phocadownload/models/file.php)

Code: Select all

// Don't display file if user has no access
			// - - - - - - - - - - - - - - - 
			if (empty($this->_document)) {
				return null;
			} 
			
			if (isset($this->_document[0]->access)) {
				if ($aid !== null) {
					if ($this->_document[0]->access > (int) $aid) {
					
							//$mainframe->redirect(JRoute::_('index.php?option=com_user&view=login', false), JText::_("Please login to download the file"));
							// Return URL
							$return	= 'index.php?option=com_phocadownload&view=file&id='.$this->_document[0]->id.':'.$this->_document[0]->alias. $limitstartUrl . '&Itemid='. JRequest::getVar('Itemid', 0, '', 'int');
							
							
							$returnUrl  	= 'index.php?option=com_user&view=login&return='.base64_encode($return);
							$mainframe->redirect(JRoute::_($returnUrl), JText::_("Please login to download the file"));
							exit;
					}
				} else {
					return null;
				}
			} else {
				return null;
			}
			// - - - - - - - - - - - - - - - -
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: (1.3.9) Redirect custom login page

Post by Jan »

Hi, you need to check if your article login feature is able to return to site which is defined in return parameter.

Jan
If you find Phoca extensions useful, please support the project
Post Reply