Exemplo n.º 1
0
 public function save(array $options = array())
 {
     $changed = $this->isDirty() ? $this->getDirty() : false;
     parent::save($options);
     if ($changed) {
         Event::fire("user.changed", array($this->id, array_keys($changed)));
     }
 }
Exemplo n.º 2
0
 /**
  * Saves the group.
  *
  * @param  array  $options
  * @return bool
  */
 public function save(array $options = array())
 {
     $this->validate();
     return parent::save();
 }
Exemplo n.º 3
0
 /**
  * Saves the model instance to database. If necessary, it will purge the model attributes
  * of unnecessary fields. It will also replace plain-text password fields with their hashes.
  *
  * @param array $options
  * @return bool
  */
 protected function performSave(array $options)
 {
     if ($this->autoPurgeRedundantAttributes) {
         $this->attributes = $this->purgeArray($this->getAttributes());
     }
     if ($this->autoHashPasswordAttributes) {
         $this->attributes = $this->hashPasswordAttributes($this->getAttributes(), static::$passwordAttributes);
     }
     return parent::save($options);
 }