2012-03-19 2 views
0

나는 joomla 웹 사이트를 가지고 있으며 사용자 등록과 로그인을 위해 커뮤니티 빌더를 사용합니다.Joomla Cb 로그인 현재 페이지가 추가 된 URL 리디렉션

URL이 "http : //localhost/joomla/index.php/page1"인 페이지가 있고 그 페이지에 로그인 모듈을 넣었습니다. 로그인 후 사용자를 "http : //localhost/joomla/index.php/page2"로 리디렉션하고 싶습니다. 그래서 관리에서 Login Redirection URL 필드를 "index.php/page2"로 설정했습니다.

하지만 내 문제는 "http : //localhost/joomla/index.php/page2/page1"로 리디렉션됩니다. 내 URL에 page1을 추가하지 않고 page2로 어떻게 재전포 할 수 있습니까?

감사합니다.

답변

0

가 CB 자동 로그인을위한 솔루션이며, 이메일 확인이 필요하지 않을 경우 등록 후 리디렉션 :
편집 :

echo "\n<div>" . implode("</div>\n<div>", $messagesToUser) . "</div>\n"; 

: 1078 주위에 라인이 있습니다
/components/com_comprofiler/comprofiler.php을 이것을 (로그인에서 빼냄) :

 
    //lets try to auto-login 
    $app = &JFactory::getApplication();

$password = cbGetParam($_POST, 'password', '', _CB_ALLOWRAW); if($app->isSite()) { # Login process $credentials = array( "username" => $username, "password" => $password ); if(is_dir(JPATH_BASE . DS . "components" . DS . "com_comprofiler")) { $database = &JFactory::getDBO(); $sql_sync = "INSERT IGNORE INTO #__comprofiler(id, user_id) SELECT id,id FROM #__users"; $database->setQuery($sql_sync); $database->query(); } $app->login($credentials); // Beside a redirection, writing out a text... global $mainframe; $mainframe->redirect(JRoute::_("<redirect-to-link>"),JText::_("You have logged in automatically.")); } else { // This is just a redirection... global $mainframe; $mainframe->redirect(JRoute::_("<redirect-to-link>")); }
관련 문제