Простой вопрос для некоторых, я уверен.Сама функция выполняет то, что запрашивается, но сообщение не высвечивается при действии.
Функция ниже:
function edit($id = null) {
if($this->Auth->user('id')==$id) {
$this->set('user', $this->User->read(null, $id));
} else {
$this->Session->setFlash(__('You are not authorized to edit other member profiles', true));
$this->redirect(array('action' => 'index'));
}
if (!empty($this->data)) {
if ($this->User->save($this->data)) {
$this->Session->setFlash(__('Member profile saved', true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('Member profile could not be saved. Please, try again.', true));
}
}
if (empty($this->data)) {
$this->data = $this->User->read(null, $id);
}
$groups = $this->User->Group->find('list');
$this->set(compact('groups'));
}
Все еще изучая веревки CakePHP и разжигая некоторые очень старые навыки PhP -так терпите меня!Спасибо!