Search code examples
symfony1symfony-1.4sfdoctrineguardsfguardsymfony-plugins

sfSocialPlugin with sfDoctrineGuardUser


I use symfony 1.4.11 with sfDoctrineGuardUser 4.0.1 plugin and sfSocialPlugin So, I have next problem .Source of problem is sfSocialPlugin, and

lib/model/doctrine/sfDoctrineGuardPlugin/sfGuardUser.php and set class to extend sfSocialGuardUser instead of PluginsfGuardUser

When I make class sfGuardUser extends sfSocialGuardUser , I have problem, but when class sfGuardUser extends PluginsfGuardUser all works fine.

I do not now why it is not work because :

class sfGuardUser extends sfSocialGuardUser

class sfSocialGuardUser extends PluginsfGuardUser

Thank you!


Solution

  • Problem in this function in sfSocialGuardUser

    public function getProfile()
      {
        $p = Doctrine_Query::create()
          ->from('sfGuardUserProfile p')
          ->where('p.user_id = ?', $this->getId())
          ->fetchOne();
    
        return empty($p) ? new sfGuardUserProfile : $p;
      }
    

    Without it, all works fine/