<?php
$userMap = true;

Configure::write('Session', Hash::merge(
	Configure::read('Session'),
	array(
		'defaults' => 'php',
		'handler' => array(
			'engine' => 'RedisSession.RedisSession',
			'userMap' => $userMap,
			//'userMapPrefix' => 'USERS',
			//'userMapField' => 'id',
			//'prefix' => 'PHPREDIS_SESSION',
			//'host' => 'localhost',
			//'port' => '6379',
			//'db' => 0,
		),
	)
));

if ($userMap) {
	if (extension_loaded('wddx')) {
		ini_set('session.serialize_handler', 'wddx');
	} else {
		CakeLog::critical('wddx not available. user map not enabled');
	}
}

<?php

$handlerConfig = Hash::merge(array(
	'engine' => 'RedisSession.RedisSession',
	'userMap' => true,
), Configure::consume('RedisSession.handler'));

Configure::write('Session', Hash::merge(
	Configure::read('Session'),
	array(
		'defaults' => 'php',
		'handler' => $handlerConfig,
	)
));

if (isset($handlerConfig['userMap'])) {
	if (extension_loaded('wddx')) {
		ini_set('session.serialize_handler', 'wddx');
	} else {
		CakeLog::critical('wddx not available. user map not enabled');
	}
}

Make it easier to load config set by app/other plugin
Make it easier to load config set by app/other plugin
