handlers/login.js
function (server, uid, token) {
	
	try {
		// convert uid to number if not already
		if (typeof uid === 'string')
			uid = parseInt(uid);
	}
	catch (e) {
		LOG.error('uid cannot be parsed as integer...', 'login.send_remote_login');
		return false;
	}
	
	SR.User.loginLocal(server, uid, token, function (result) {
		// NOTE: if local server is not registered, will return 'undefined' as result
		if (result) {
			// NOTE: result has U and P fields
			LOG.warn('local login result for [' + uid + ']: ' + (result.code === 0));
		}
		else
			LOG.warn('local login result for [' + uid + ']: remote server not online');
	});
	
	return true;
}
function (server, uid, token) {
	
	try {
		// convert uid to number if not already
		if (typeof uid === 'string')
			uid = parseInt(uid);
	}
	catch (e) {
		LOG.error('uid cannot be parsed as integer...', 'login.send_remote_login');
		return false;
	}
	
	SR.User.loginLocal(server, uid, token, function (result) {
		// NOTE: if local server is not registered, will return 'undefined' as result
		if (result) {
			// NOTE: result has U and P fields
			LOG.warn('local login result for [' + uid + ']: ' + (result.code === 0));
		}
		else
			LOG.warn('local login result for [' + uid + ']: remote server not online');
	});
	
	return true;
}
function ( server , uid , token ) { try { // convert uid to number if not already if ( typeof uid === 'string' ) uid = parseInt ( uid ) ; } catch ( e ) { LOG . error ( 'uid cannot be parsed as integer...' , 'login.send_remote_login' ) ; return false ; } SR . User . loginLocal ( server , uid , token , function ( result ) { // NOTE: if local server is not registered, will return 'undefined' as result if ( result ) { // NOTE: result has U and P fields LOG . warn ( 'local login result for [' + uid + ']: ' + ( result . code === 0 ) ) ; } else LOG . warn ( 'local login result for [' + uid + ']: remote server not online' ) ; } ) ; return true ; }
send login info for local server
send login info for local server