I have the following situation:
I have my application running with CakePHP 2.X, however the authentication system is external and I do not have access to it, the only thing I was given is the $ _SESSION variables made available by the server.
Is there any way I can access these $_SESSION
within CakePHP? Using the Framework features to achieve the values?
EDIT 1
Using the session_start()
command, within the View I can retrieve the values, however I need to retrieve those values in Model ...
EDIT 2
public function beforeFilter() {
parent::beforeFilter();
if($_SESSION['chave']){
$this->Session->write('chave', $_SESSION['chave']);
$this->Session->write('nmCracha', $_SESSION['nmCracha']);
$this->Session->write('prefDep', $_SESSION['prefDep']);
}else{
$this->redirect('http://...../index.html');
}
}