Manage Login Redirection in Pyrocms

六眼飞鱼酱① 提交于 2019-12-05 17:29:57
Pramod Kumar Sharma

Finally, i have come with the exact solution which is working correctly for me.

Whenever user try to view the gallery page(restricted page) which require user login, we have to only assign the URL where we want to redirect after successful login in $redirect_to in the controller method:

$this->session->set_userdata('redirect_to',$redirect_to);

Then it will automatically redirect the control to the desired page. Because in the users controller the login function is developed in such a way that:

$redirect_to = $this->input->post('redirect_to') ? $this->input->post('redirect_to') : $this->session->userdata('redirect_to');

Hopefully this will help you sometime

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!