mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding ability to read cookies in the Controller::beforeFilter()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5304 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
02d6c55d9f
commit
a80be72ff3
1 changed files with 4 additions and 0 deletions
|
@ -256,6 +256,10 @@ class CookieComponent extends Object {
|
|||
* @access public
|
||||
*/
|
||||
function read($key = null) {
|
||||
if(empty($this->__values) && isset($_COOKIE[$this->name])) {
|
||||
$this->__values = $this->__decrypt($_COOKIE[$this->name]);
|
||||
}
|
||||
|
||||
if(is_null($key)){
|
||||
return $this->__values;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue