modules/orionode/lib/shared/db/userProjects.js
function addProjectToUser(user, project) {
		return addUser(user)
		.then(function(doc) {
			return userProject.findOneAndUpdate({username: user}, {$addToSet: {'sharedProjects': project} }, {
				safe: true,
				w: 'majority'
			}).exec();
		});
	}
function addProjectToUser(user, project) {
		return addUser(user)
		.then(function(doc) {
			return userProject.findOneAndUpdate({username: user}, {$addToSet: {'sharedProjects': project} }, {
				safe: true,
				w: 'majority'
			}).exec();
		});
	}
function addProjectToUser ( user , project ) { return addUser ( user ) . then ( function ( doc ) { return userProject . findOneAndUpdate ( { username : user } , { $addToSet : { 'sharedProjects' : project } } , { safe : true , w : 'majority' } ) . exec ( ) ; } ) ; }
Adds project to user's shared projects.
Adds project to user s shared projects .