0
사용자 이름이나 암호가 잘못되었을 때이 오류가 발생했습니다. 올바른 사용자 이름과 암호를 사용하여 성공적으로 실행하십시오. 에 ....비 객체에서 count() 함수를 호출하십시오.
내 코드가 아닌 객체의 멤버 함수 카운트()에 전화는
public function executeLogin(sfWebRequest $request)
{
$this->form = new loginForm();
if ($request->isMethod('post'))
{
$this->form->bind($request->getParameter('login'));
if ($this->form->isValid())
{
$unm=$this->form->getValue('username');
$pwd=$this->form->getValue('password');
$q = Doctrine_Query::create()
->select('id')
->from('login')
->andWhere('username = ?', $unm)
->andWhere('password = ?', $pwd);
$q->execute();
$result = $q->fetchOne();
if ($result->count() > 0)
{
$this->getUser()->setAuthenticated(true);
$this->getUser()->addCredential('user');
$this->redirect('user/index');
}
else
{
$this->redirect('user/login');
}
}
}
}
는, 스택 백 트레이스를 게시하시기 바랍니다. – Jacobson
symfony1.4의 새로운 기능입니다. 그래서 내가 원하는 것을 알지 못합니다. – hemsbhardiya