Welcome Guest, Not a member yet? Register   Sign In
problem with session in template
#1

(This post was last modified: 05-14-2015, 04:53 AM by StratoKyke.)

I would have the need to use the if statement within the view to display different data depending if the user is logged in or not.

In this moment the controller is:
PHP Code:
public function index() {
 if(
$this->session->userdata('logged_in')){
 
$session_data $this->session->userdata('logged_in');
 
$data['username'] = $session_data['login'];
 
$this->smarty->view('home.tpl'$data);
 } else {
 
redirect('user/login''refresh');
 }
 } 

I use the smarty template.

How can I make sure to spend the session management across smarty template? So the management and data?

Thanks for the reply.
Reply


Messages In This Thread
problem with session in template - by StratoKyke - 05-14-2015, 02:35 AM
RE: problem with session in template - by CroNiX - 05-16-2015, 03:56 PM
RE: problem with session in template - by CroNiX - 05-17-2015, 09:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB