session in codeigniter Undefined property: CI::$session
<p>I'm having trouble loading my view on my login page . Having problems with the session here . I have a helper class that $ key security is part of it . But I think it is to do a session as an error saying .</p>

<p>I thought I had prepared a num lines was not sure whether also that it may cause.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php $this-&gt;load-&gt;library('session');
      if(!$this-&gt;session-&gt;user_email)
      { ?&gt;
            &lt;li &lt;?php echo ($controller=="login" )? "class='active'": ""?&gt;&gt;
            &lt;a href="&lt;?php echo base_url('login') ?&gt;"&gt;
             Login
            &lt;/a&gt;
            &lt;/li&gt;
            &lt;?php } else { ?&gt;
            &lt;li&gt;
                &lt;a href="&lt;?php echo base_url('login/logout') ?&gt;"&gt;
                    Logout
                &lt;/a&gt;
            &lt;/li&gt;
&lt;?php } ?&gt;</code></pre>
</div>
</div>
</p>

<p>this problem </p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>Error was encountered

Severity: Notice

Message: Undefined property: CI_Loader::$session

Filename: views/header.php

Line Number: 145

Backtrace:</code></pre>
</div>
</div>
</p>