public function save($conn = null) { if ($this->isNew()) { $this->setActivationKey(md5(rand(100000, 999999) . $this->getEmail())); } parent::save($conn); }
public function save(Doctrine_Connection $con = null) { if ($fileName = $this->getImage()) { DNS::resizeImage(80, 80, $fileName, sfConfig::get('sf_upload_dir') . '/avatars/', sfConfig::get('sf_upload_dir') . '/avatars/'); } parent::save($con); }
public function save($con = null) { // == pre save hook // fill prereq fields // == call the parent save() method parent::save($con); }
/** * Returns a peer instance associated with this om. * * Since Peer classes are not to have any instance attributes, this method returns the * same instance for all member of this class. The method could therefore * be static, but this would prevent one from overriding the behavior. * * @return sfGuardUserProfilePeer */ public function getPeer() { if (self::$peer === null) { self::$peer = new sfGuardUserProfilePeer(); } return self::$peer; }