1

会員情報をページに表示したい。

これが私のrouting.yml

member_show:
  url:   /membres/profil/:id
  class: sfDoctrineRoute
  options: { model: sfGuardUser, type: object }
  param: { module: member, action: show }

これが私のactions.class.php

public function executeShow(sfWebRequest $request)
{
  if($this->getUser()->isAuthenticated())
  {
    $this->member = $this->getRoute()->getObject();
  }
  else
  {
    $this->redirect('@homepage');
  }
}

しかし、私はこのエラーが発生します:

「sfGuardUser」の不明なレコード プロパティ/関連コンポーネント「user」

スタック トレースは次のとおりです。

http://pastebin.com/G1rcLL6r

4

1 に答える 1

1

コメントとして投稿したスタック トレースに基づいて$this->getResponse()->setTitle('XX - '.$this->member->getUsername());apps/frontend/modules/member/actions/actions.class.php

于 2012-10-03T22:11:45.347 に答える