[eluser]eggshape[/eluser]
Well how are $firstname and $lastname assigned? If you're assigning from a form, you don't need to pass the parameters:
Code:
function __construct()
{
$this->firstname = $this->input->post('firstname');
$this->lastname = $this->input->post('lastname');
}
However, I would advise against this because you have not validated the form fields. Alternatively, you can instantiate the model (load it), run validation, and then call your method createNew(), like how MaadMac suggested. Note, you can do all this in the constructor if you wish.