CakePHP – Sessions


print_r($this -> Session -> read());

$this -> Session -> write("variable", "value");
$this -> Session -> read("variable");

$user_email = $this -> data['User']['email'];
$user       = $this -> User -> find("email = '$user_email'");
$this -> Session -> write('User', $user['User']);

$this -> Session -> read("User.email");

if ($this -> Session -> valid()){
	$this -> Session -> destroy();
	$this -> redirect('/');
}
Source:
http://justkez.com/understanding-cakephp-sessions/