我正在尝试让“产品”页面显示特定用户的简介和图片。我拥有的代码在下面,但它不断拉动当前登录的用户的简介和图片,这不是我想要的。一旦我注销,我就会收到Call to a member function getBlurb() on a non-object
错误消息。有没有办法调出特定用户的“模糊”和“图片”字段?
public function executeShow(sfWebRequest $request)
{
$this->car = $this->getRoute()->getObject();
$seller_id = $this->car->getSeller_id();
$this->seller = $this->getUser()->getGuardUser($seller_id);
$this->blurb = $this->seller->getBlurb();
$this->picture = $this->seller->getPicture();
}