Hello together,
i want test what Security Component can do. So i added it
var $components = array('Security');
and in beforeFilter
function beforeFilter() {
parent::beforeFilter();
$this->Auth->allow('index','search');
// Security Component
$this->Security->requireAuth('add','edit');
// Security Component
$this->set('id',$this->Auth->user('id'));
$this->set('username',$this->Auth->user('username'));
}
But since this moment i had some Problems
in my controller action
Undefined index: Translate [APP/controllers/
translates_controller.php, line 84]
This is the Action with line 84
function search(){
$this->set('rowCount',$this->Translate->find('count'));
// $this->Session->setFlash();
83 $this->set('results',$this->Translate->search($this->data
['Translate']['q']));
84 $results=$this->Translate->search($this->data['Translate']
['q']);
if (!empty($this->data['Translate']['q']) && empty($results))
{
$this->Session->setFlash("Dieser Datensatz exitiert (noch)
nicht.");
$this->redirect(array('action'=>'add'), null, true);
}
else
{
$this->set('results', $results);
// $this->Session->setFlash("Test: ".$this->data['Translate']
['q']);
}
}
Whats that for an error?
many greeting
Marcus Radisch
--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---