Page 1 of 1

(1.3.9) Redirect custom login page

Posted: 21 Sep 2011, 16:10
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;
			}
			// - - - - - - - - - - - - - - - -

Re: (1.3.9) Redirect custom login page

Posted: 27 Sep 2011, 16:56
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