[eluser]ReyPM[/eluser]
Hi every, I'm try to check if $this->current_user is set otherwise redirect to the login page but because Wall is my default route it loops and give me a 500 Internal Server Error, does any have some ideas in how to work with that? I'm using PyroCMS and them use IonAuth.
Code:
class Wall extends Public_Controller {
public function __construct() {
parent::__construct();
if (empty($this->current_user)) {
$this->session->set_flashdata('error', 'Debes iniciar sesión para acceder a esta página');
redirect(site_url());
}
}
}
Cheers and thanks in advance