Hi scs,
The error I'm reporting happens with the legacy app, as I got it, without
any changes applied.
Here are the contents of Model/user.php:
<?php
class user extends AppModel
{
public $name = "connection";
public $validate = array(
'NOM' => 'not_empty'
);
}
And the contents of Controller/usersController.php:
<?php
class usersController extends AppController
{
public $name = "users";
public $helpers = array('Html', 'Form');
public function index()
{
$this->set('usersArray', $this->user->find('all'));
}
public function details($id = null)
{
$this->user->id = $id;
$this->set('userRead', $this->user->read());
}
public function add()
{
if ($this->request->is('post'))
{
if ($this->user->save($this->request->data))
{
$this->Session->setFlash("Your account has been
saved");
$this->redirect(array('action' => 'index'));
} else
{
$this->Session->setFlash("Error");
}
}
}
}
Thank you for reading,
Luís
On Tuesday, 14 August 2012 20:47:22 UTC+2, scs wrote:
>
> Ok After re reading the top it sound like you said you copy only the
> View/User folder to the legacy and that is giving you problems. If this is
> the case, you need to also move the Controller and Model files for users to
> the legacy app. If both of these files are already there show us what you
> have in your user controller/model files.
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.