title: Values not getting saved in database in codeigniter tank auth
body: <p>I have added two fields in a registration form of tank auth.Field with name fname and lname.
  I have added the same in the form_validation as you can see the controller file.But username,password,email is injected into database expect fname and lname.What is wrong in the code?I have checked if the name of the field,they are correct.The form validation is also working,but the database field name is also fname and lname.Can someone figure out the problem.have been sitting on this for a long time but couldnt find them working</p>
  
  <p>The auth.php controller is </p>
  
  <pre><code>if ($use_username) {
                  $this-&gt;form_validation-&gt;set_rules('username', 'Username', 'trim|required|xss_clean|min_length['.$this-&gt;config-&gt;item('username_min_length', 'tank_auth').']|max_length['.$this-&gt;config-&gt;item('username_max_length', 'tank_auth').']|alpha_dash');
              }
              $this-&gt;form_validation-&gt;set_rules('email', 'Email', 'trim|required|xss_clean|valid_email');
              $this-&gt;form_validation-&gt;set_rules('password', 'Password', 'trim|required|xss_clean|min_length['.$this-&gt;config-&gt;item('password_min_length', 'tank_auth').']|max_length['.$this-&gt;config-&gt;item('password_max_length', 'tank_auth').']|alpha_dash');
              $this-&gt;form_validation-&gt;set_rules('confirm_password', 'Confirm Password', 'trim|required|xss_clean|matches[password]');
              $this-&gt;form_validation-&gt;set_rules('fname', 'First Name', 'trim|required|xss_clean'); // I added
              $this-&gt;form_validation-&gt;set_rules('lname', 'Last Name', 'trim|required|xss_clean'); //I added
  
  
              $captcha_registration   = $this-&gt;config-&gt;item('captcha_registration', 'tank_auth');
              $use_recaptcha          = $this-&gt;config-&gt;item('use_recaptcha', 'tank_auth');
              if ($captcha_registration) {
                  if ($use_recaptcha) {
                      $this-&gt;form_validation-&gt;set_rules('recaptcha_response_field', 'Confirmation Code', 'trim|xss_clean|required|callback__check_recaptcha');
                  } else {
                      $this-&gt;form_validation-&gt;set_rules('captcha', 'Confirmation Code', 'trim|xss_clean|required|callback__check_captcha');
                  }
              }
              $data['errors'] = array();
  
              $email_activation = $this-&gt;config-&gt;item('email_activation', 'tank_auth');
  
              if ($this-&gt;form_validation-&gt;run()) {                                // validation ok
                  if (!is_null($data = $this-&gt;tank_auth-&gt;create_user(
                          $use_username ? $this-&gt;form_validation-&gt;set_value('username') : '',
                          $this-&gt;form_validation-&gt;set_value('fname'),//I added
                          $this-&gt;form_validation-&gt;set_value('lname'),
                          $this-&gt;form_validation-&gt;set_value('email'),
                          $this-&gt;form_validation-&gt;set_value('password'),
                          $email_activation)))
  </code></pre>
  
  <p>user.php model</p>
  
  <pre><code>function create_user($data, $activated = TRUE)
      {
          $data['created'] = date('Y-m-d H:i:s');
          $data['activated'] = $activated ? 1 : 0;
  
          if ($this-&gt;db-&gt;insert($this-&gt;table_name, $data)) {
              $user_id = $this-&gt;db-&gt;insert_id();
              if ($activated) $this-&gt;create_profile($user_id);
              return array('user_id' =&gt; $user_id);
          }
          return NULL;
      }
  </code></pre>