diff options
author | John McLear <john@mclear.co.uk> | 2012-09-04 17:25:19 +0200 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2012-09-04 17:25:19 +0200 |
commit | 21dcce22966640e4b72575a6458622a4079ee924 (patch) | |
tree | 938a22093e76f589c7965cfa409a12f94da58649 | |
parent | 40a7b43799606bb582081e59d7a11ff9aa498ac2 (diff) | |
download | etherpad-lite-21dcce22966640e4b72575a6458622a4079ee924.zip |
Update src/node/db/AuthorManager.js
-rw-r--r-- | src/node/db/AuthorManager.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/node/db/AuthorManager.js b/src/node/db/AuthorManager.js index 06b69051..6fe38abe 100644 --- a/src/node/db/AuthorManager.js +++ b/src/node/db/AuthorManager.js @@ -142,6 +142,25 @@ exports.getAuthor = function (author, callback) } /** + * Returns the Author Name of the author + * @param {String} author The id of the author + * @param {Function} callback callback(err, name) + */ + +exports.getAuthorName = function (authorID, callback) +{ + db.getSub("globalAuthor:" + author, ["name"], callback); + console.log(authorID); + db.getSub("globalAuthor:" + authorID, ["name"], function(err, authorName){ + if(ERR(err, callback)) return; + console.log(authorName); + callback(null, {authorName: authorName}); + }); +} + + + +/** * Returns the color Id of the author * @param {String} author The id of the author * @param {Function} callback callback(err, colorId) |