21/03/2012 10:29am

PHP | Problem - Connection reset


<?php

class MemberDecorator extends DataObjectDecorator {

function extraStatics() {
return array(
'db' => array (
'PasswordReset' => 'Varchar',
)
);
}

public function onAfterWrite() {
// Send email
if ($this->Password == null && Controller::curr() instanceof LeftAndMain) {
//$from = Email::getAdminEmail();
//$to = $this->Email;
//$email = new Email($from, $to, 'Welcome to RICS!', '');
//$email->setTemplate('WelcomePassword');
//$email->populateTemplate(array(
//'Member' => $this
//));
//$email->send();
$this->owner->PasswordReset = 'aa776';
$this->owner->write();
}
return parent::onAfterWrite();
}

}
?>


Post Comment