6
* This class has been auto-generated by the Doctrine ORM Framework
11
* @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
13
class sfGuardUserProfile extends PluginsfGuardUserProfile
15
public function save(Doctrine_Connection $conn = null)
17
if (!$this->getToken())
19
if (!$this->getUserId())
21
throw new Exception("A profile must have a user id associated");
23
$user = Doctrine_Core::getTable('sfGuardUser')->findOneById();
24
$this->setToken(sha1($user->getEmail().rand(111,999)));
26
return parent::save($conn);