From 9952e4583ce546f244a53a86edbfc4a7b741b215 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 9 Apr 2013 23:16:00 +0000 Subject: [PATCH] Get user by UUID API function [#331] --- modules/users/api.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/users/api.js b/modules/users/api.js index f779941..207b4d3 100644 --- a/modules/users/api.js +++ b/modules/users/api.js @@ -25,6 +25,14 @@ var api = function(dbot) { }); }, + // Return a user record given a UUID + 'getUser': function(uuid, callback) { + this.db.get('users', uuid, function(err, user) { + if(err) user = false; + callback(user); + }); + }, + 'getChannel': function(server, channelName, callback) { var channel = false; this.db.search('channel_users', {