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.
该法典是:
..... (form is_valid and check email ok)
if(is_object($object)) {
$newpassword = substr(str_shuffle(str_repeat( ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ,8)),0,8);
$input = $form->getValues();
$user = Doctrine::getTable( Tcc_Model_User )
->find($input[ email ]);
$user->fromArray($input);
$user->Password = md5($newpassword);
$user->save();
......
email send
} else {
$form->getElement( email )->addError( Sorry, there is no record of that email adddress. );
}
我发现的错误是:
Call to a member function fromArray() on a non-object
难道有人能帮助我看一看我做什么错了? 请