bundles/org.eclipse.orion.client.collab/web/orion/collab/collabClient.js
function(callback) {
			var self = this;
			var userService = this.serviceRegistry.getService("orion.core.user"); 
			var authServices = this.serviceRegistry.getServiceReferences("orion.core.auth");
			var authService = this.serviceRegistry.getService(authServices[0]);
			authService.getUser().then(function(jsonData) {
				userService.getUserInfo(contextPath + jsonData.Location).then(function(accountData) {
					var username = accountData.UserName;
					self.clientDisplayedName = accountData.FullName || username;
					var MASK = 0xFFFFFF + 1;
					var MAGIC = 161803398 / 2 % MASK;
					self.clientId = username + '.' + guid.substr(0, 4);
					callback();
				}, function(err) {
					console.error(err);
				});
			});
		}
function(callback) {
			var self = this;
			var userService = this.serviceRegistry.getService("orion.core.user"); 
			var authServices = this.serviceRegistry.getServiceReferences("orion.core.auth");
			var authService = this.serviceRegistry.getService(authServices[0]);
			authService.getUser().then(function(jsonData) {
				userService.getUserInfo(contextPath + jsonData.Location).then(function(accountData) {
					var username = accountData.UserName;
					self.clientDisplayedName = accountData.FullName || username;
					var MASK = 0xFFFFFF + 1;
					var MAGIC = 161803398 / 2 % MASK;
					self.clientId = username + '.' + guid.substr(0, 4);
					callback();
				}, function(err) {
					console.error(err);
				});
			});
		}
function ( callback ) { var self = this ; var userService = this . serviceRegistry . getService ( "orion.core.user" ) ; var authServices = this . serviceRegistry . getServiceReferences ( "orion.core.auth" ) ; var authService = this . serviceRegistry . getService ( authServices [ 0 ] ) ; authService . getUser ( ) . then ( function ( jsonData ) { userService . getUserInfo ( contextPath + jsonData . Location ) . then ( function ( accountData ) { var username = accountData . UserName ; self . clientDisplayedName = accountData . FullName || username ; var MASK = 0xFFFFFF + 1 ; var MAGIC = 161803398 / 2 % MASK ; self . clientId = username + '.' + guid . substr ( 0 , 4 ) ; callback ( ) ; } , function ( err ) { console . error ( err ) ; } ) ; } ) ; }
Initialize client name and id
@param {function} callback
Initialize client name and id