title: php error: Call to a member function fromArray() on a non-object
body: <p>I am trying to set up a "forgot password" system. User enters email and if it exists a new email is recorded and sent to the user email address entered. The user email check works ok. When trying to enter a new passord into system it does not.</p>
  
  <p>The code is this:</p>
  
  <pre><code>..... (form is_valid and check email ok)
  
  if(is_object($object)) {
  
          $newpassword = substr(str_shuffle(str_repeat('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',8)),0,8);
  
          $input = $form-&gt;getValues();
  
          $user = Doctrine::getTable('Tcc_Model_User')
              -&gt;find($input['email']);
  
          $user-&gt;fromArray($input);
          $user-&gt;Password = md5($newpassword);
          $user-&gt;save();
  ......
  email send
  
  } else {
      $form-&gt;getElement('email')-&gt;addError('Sorry, there is no record of that email adddress.');
    }
  </code></pre>
  
  <p>the error I get is this:</p>
  
  <pre><code>Call to a member function fromArray() on a non-object
  </code></pre>
  
  <p>Could someone help me figure out what I am doing wrong? Please.</p>