Beispiel #1
0
 function getState()
 {
     if (parent::getIsLock() == 1) {
         return lang::get("Is normal!");
     } else {
         return lang::get("Is lock!");
     }
 }
Beispiel #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     UsersPeer
  */
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new UsersPeer();
     }
     return self::$peer;
 }
Beispiel #3
0
 public function save(Doctrine_Connection $con = null)
 {
     $id = $this->getId();
     // Saving user
     $q = parent::save();
     // If user is new and invited
     if (!$id && $this->getParent() != null) {
         // Notify godfather
         Doctrine::getTable('Notifications')->setNotification("is just registered with your invitation.", "user_add.png", null, "@profile?slug=" . $this->getSlug())->setUid($this->getId())->setOwner($this->getParent())->save();
     }
     return $q;
 }
Beispiel #4
0
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }