Advertisement
Guest User

Untitled

a guest
Jun 27th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. $this->ModelName->read(NULL, $id);
  2.  
  3. unset($user['User']['modified']);
  4.  
  5. $this->User->save($user);
  6.  
  7. public function beforeSave($options = array()) {
  8. parent::beforeSave();
  9. if (isset($this->data[$this->alias]['modified'])) {
  10. unset($this->data[$this->alias]['modified']);
  11. }
  12. if (isset($this->data[$this->alias]['created'])) {
  13. unset($this->data[$this->alias]['created']);
  14. }
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement