我有一个基于 Kohana 的网站,我想在一个函数中验证用户来自哪里。因此,如果他来自特定路线,我必须将他重定向到某个地方。
有没有办法在 Kohana 3.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
}