Miscellany
public text v1 · immutable $username = $this->getRequestParameter('username');
$c = new Criteria();
$c->add(AccountsPeer::USERNAME, $username);
$this->result = AccountsPeer::doSelect($c);
if($this->result) {
$this->getUser()->setAttribute('username',$username);
$this->sitekey = $result->getSitekey();
return sfView::SUCCESS;
} else {
return sfView::ERROR;
}