title: how to add userid on session data in codeigniter
body: <p>I have added the username in session like this </p>
  
  <pre><code>if($this-&gt;form_validation-&gt;run() !== FALSE){
              //validation pass
              $res = $this-&gt;Admin_model-&gt;verify_user($this-&gt;input-&gt;post('email_address'), $this-&gt;input-&gt;post('password'), $this-&gt;_salt);
  
              //if result is true login
              if($res !== false){
                  //person has account
                  $_SESSION['username'] = $this-&gt;input-&gt;post('email_address');
  </code></pre>
  
  <p>Now how do i add user_id in a session after user login ?</p>