2012-10-08 166 views
2

我爲Joomla 2.5編寫了一個小型授權插件(類),使用onUserAuthenticate事件幫助。它看起來像:登錄後Joomla重定向

class plgauthenticationAuth extends JPlugin{ 

    public function plgauthenticationAuth($subject, $config){ 
     parent::__construct($subject,$config); 
    } 

    public function onUserAuthenticate($credentials, $options, $response){ 
//my code 

如何從這裏我可以設置重定向到自定義網址?

回答

1

嘗試這個

$mainframe = JFactory::getApplication(); 
$redirct = 'your url'; 
$mainframe->redirect($redirct); 
+0

在這種情況下,授權不起作用。我想我需要一些像onAfterRoute這樣的應用程序,但是隻有授權纔有效。 – user1692333