public function add() { $this->layout = 'home'; if ($this->request->is('post')) { $this->request->data['User']['avatar'] = 'noavatar.jpg'; if ($this->User->save($this->request->data)) { $this->Session->setFlash('The user has been saved'); $this->redirect(array('controller'=>'users','action' => 'usermanager')); } else { $this->Session->setFlash('The user could not be saved. Please, try again.'); } }