handlers/login.js
function (login_id, session, data) {

	// acknowledge as 'logined'	
	l_loginID[login_id] = data.account;
	
	// init session
	session['_account'] = data.account;
	
	// TODO: needs to fix this, should read "groups" from DB
	session['_groups'] = data.groups;
	session['_permissions'] = data.permissions;
	session['lastStatus'] = data.lastStatus;
	
	// TODO: centralize handling of logined users?
	//SR.User.addGroup(user_data.account, ['user', 'admin']);
}
function (login_id, session, data) {

	// acknowledge as 'logined'	
	l_loginID[login_id] = data.account;
	
	// init session
	session['_account'] = data.account;
	
	// TODO: needs to fix this, should read "groups" from DB
	session['_groups'] = data.groups;
	session['_permissions'] = data.permissions;
	session['lastStatus'] = data.lastStatus;
	
	// TODO: centralize handling of logined users?
	//SR.User.addGroup(user_data.account, ['user', 'admin']);
}
function ( login_id , session , data ) { // acknowledge as 'logined'	 l_loginID [ login_id ] = data . account ; // init session session [ '_account' ] = data . account ; // TODO: needs to fix this, should read "groups" from DB session [ '_groups' ] = data . groups ; session [ '_permissions' ] = data . permissions ; session [ 'lastStatus' ] = data . lastStatus ; // TODO: centralize handling of logined users? //SR.User.addGroup(user_data.account, ['user', 'admin']); }
initialize session content based on registered or logined user data
initialize session content based on registered or logined user data