2012-03-19 50 views
0

追加我有一個Joomla的網站,我用社區建設者的用戶註冊和登錄。的Joomla的Cb登錄重定向URL爲通過當前頁

我有一個網頁的URL的「http://localhost/joomla/index.php/page1」我把一個登錄模塊,在該網頁。登錄後,我想將用戶重定向到「HTTP://localhost/joomla/index.php/page2」。所以我將管理中的登錄重定向URL字段設置爲「index.php/page2」。

但我的問題是,它重定向我的 「http://localhost/joomla/index.php/page2/page1」。 我怎麼能只是它rediect到第2頁而不附加在我的網址的第1頁?

謝謝。

回答

0

沒有爲CB自動登錄的解決方案,並註冊後重定向如果沒有需要檢查信箱:
編輯:/components/com_comprofiler/comprofiler.php
周圍有1078行:

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

(從登錄取出)之前將這個:

 
    //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>")); }
相關問題