Welcome Guest, Not a member yet? Register   Sign In
Flashdata, language file and constructor [solved]

Howdy all! I'm new here and I have been working with CI few weeks now and I now I'm stuck with this little problem.

Main problem below is that flashdata goes thru, but it's empty. If I change 'login_access_rights' to something static text, it works just fine. So can I use (autoloaded) language file in controllers constructor if there is a redirect?

class Admin extends Controller {

    function Admin()
        if(!$this->user_model->Secure(array('userType' => array('user','admin'))))
            $this->session->set_flashdata('flashError', $this->lang->line('login_access_rights'));

Problem solved, It had nothing to do with constructors, just poorly made stylesheet what made too long message disappear.

Theme © iAndrew 2016 - Forum software by © MyBB