Пример #1
0
 public function insert()
 {
     $this->salt = uniqid(mt_rand(), TRUE);
     $this->passHash = Identity::passHash($this->password, $this->salt);
     $this->password = NULL;
     $this->created = new \DateTime('now');
     parent::insert();
 }
Пример #2
0
 public function insert()
 {
     $this->created = new \DateTime('now');
     $this->lastAccessed = new \DateTime('now');
     if (!empty($this->user)) {
         $this->userId = $this->user->userId;
     }
     $this->email = NULL;
     $this->password = NULL;
     parent::insert();
     // TODO: Change the autogenerated stub
 }