Search code examples
phpsymfony-1.4sfguard

Error when displaying a sfGuardUser


I want to display member informations in a page.

Here is my routing.yml

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

Here is my actions.class.php

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

But I get this error :

Unknown record property / related component "user" on "sfGuardUser"

Here is the stack trace :

http://pastebin.com/G1rcLL6r


Solution

  • Based on the stack trace you posted as comment, you should write $this->getResponse()->setTitle('XX - '.$this->member->getUsername()); at line #59 in apps/frontend/modules/member/actions/actions.class.php