diff --git a/node/db/AuthorManager.js b/node/db/AuthorManager.js index f93ebb682..8fa98189a 100644 --- a/node/db/AuthorManager.js +++ b/node/db/AuthorManager.js @@ -129,7 +129,7 @@ function mapAuthorWithDBKey (mapperkey, mapper, callback) exports.createAuthor = function(name, callback) { //create the new author name - var author = "g." + _randomString(16); + var author = "a." + randomString(16); //create the globalAuthors db entry var authorObj = {"colorId" : Math.floor(Math.random()*32), "name": name, "timestamp": new Date().getTime()}; @@ -193,11 +193,14 @@ exports.setAuthorName = function (author, name, callback) /** * Generates a random String with the given length. Is needed to generate the Author Ids */ -function _randomString(len) { - // use only numbers and lowercase letters - var pieces = []; - for(var i=0;i