Permalink
Browse files

Added method for getting userId

  • Loading branch information...
1 parent 6d2cd6e commit 2c9df5ad945a1350be869ba57b51e57db172da39 @englercj committed Jun 23, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/fb.js
View
8 lib/fb.js
@@ -70,7 +70,13 @@ FogBugz.prototype.findUser = function(email, cb) {
};
FogBugz.prototype.getUserId = function(email, cb) {
-
+ var self = this;
+
+ self.findUser(email, function(err, data) {
+ if(err) { if(cb) cb(err); return; }
+
+ cb(null, data.people[0].ixPerson);
+ });
};
FogBugz.prototype.newCheckin = function(caseId, payload, editedById, cb) {

0 comments on commit 2c9df5a

Please sign in to comment.