demo/lobby/router.js
function (req) {
	var session = l_getSession(req);
	if (session.hasOwnProperty('_user')) {
		var login = session._user;
		login.admin = (session._user.account === 'admin');
		return login;
	}
	
	LOG.warn('user not yet logined...');
	return {control: {groups: [], permissions: []}};
}
function (req) {
	var session = l_getSession(req);
	if (session.hasOwnProperty('_user')) {
		var login = session._user;
		login.admin = (session._user.account === 'admin');
		return login;
	}
	
	LOG.warn('user not yet logined...');
	return {control: {groups: [], permissions: []}};
}
function ( req ) { var session = l_getSession ( req ) ; if ( session . hasOwnProperty ( '_user' ) ) { var login = session . _user ; login . admin = ( session . _user . account === 'admin' ) ; return login ; } LOG . warn ( 'user not yet logined...' ) ; return { control : { groups : [ ] , permissions : [ ] } } ; }
pass in request object, returns session data if logined, otherwise returns null
pass in request object returns session data if logined otherwise returns null