Esempio n. 1
0
 /**
  * (non-PHPdoc)
  * @see angelflight/lib/model/om/BasePerson#save($con)
  */
 public function save(PropelPDO $con = null)
 {
     if ($this->isColumnModified(PersonPeer::PASSWORD)) {
         $this->setPassword($this->encryptPassword($this->getPassword()));
     }
     parent::save($con);
 }
Esempio n. 2
0
 /**
  * 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     PersonPeer
  */
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new PersonPeer();
     }
     return self::$peer;
 }
Esempio n. 3
0
 /**
  * Delete a person
  * Also deletes the person user and photo
  * @param PropelPDO $con
  */
 public function delete(PropelPDO $con = null)
 {
     $photo_path = $this->getPhotoFullPath();
     parent::delete($con);
     if ($this->getUserId()) {
         $user = sfGuardUserPeer::retrieveByPK($this->getUserId());
         $user->delete($con);
     }
     $this->deletePhysicalImage($photo_path);
 }
Esempio n. 4
0
 public function setNameMiddle($str)
 {
     parent::_set('name_middle', LsRequestFilter::emptyStringToNull(preg_replace('/[.]/', '', $str)));
 }
Esempio n. 5
0
 public function rules()
 {
     return array_merge(parent::rules());
 }