リダイレクトッreferreringルートKohana
-
29-10-2019 - |
質問
いKohanaに基づくwebサイトにおい検証機能は、ユーザーが出ているのです。なにわたって特定の経路になってリダイレクトに彼がどこかということです。
があるので、確認のルートユーザーからのもの(または単に彼ら)Kohana3.0?
コード例:
public function action_after_register(){
if ($this->authlite->logged_in())
{
$this->redirect('Home');
}
// verify if he comes from a specific route and redirect him accordingly
}
解決
また:
$ref = Request::$referrer;
とくにルートは、refを使用でき Request::process_uri($referrer_uri, $injected_routes)
とKohana3.1な3.0です。
を追加できるので手動で3.0: https://gist.github.com/1031396
注入経路の配列がオプションが厳しいリストの経路のい試験(skipをオーバーヘッドに比べるとすべての経路).
他のヒント
Request::$referer
を含む必要があります 参考文献 URL。
所属していません StackOverflow