 
   # Assumes your Campfire usernames and PagerDuty names are identical
   robot.respond /pager( me)? (\d+)/i, (msg) ->
-    withPagerDutyUsers msg, (users) ->
-
-      userId = pagerDutyUserId(msg, users)
+    withPagerDutyUser msg, (user) ->
+
+      userId = user.id
       return unless userId
 
       start     = moment().format()

      incident.assigned_to_user.email
    else if incident.resolved_by_user
      incident.resolved_by_user.email
    else 
      '(???)'

  generateIncidentString = (incident, hookType) ->

    missingAnything


  withPagerDutyUser = (msg, cb) ->

    email  = msg.message.user.pagerdutyEmail || msg.message.user.email_address
    unless email
      msg.send "Sorry, I can't figure out your email address :( Can you tell me with `#{robot.name} pager me as you@yourdomain.com`?"
      return

    pagerDutyGet msg, "/users", {query: email}, (json) ->
      if json.users.length isnt 1
        msg.send "Sorry, I expected to get 1 user back for #{email}, but got #{json.users.length} :sweat:"
        return

      cb(json.users[0])


  pagerDutyGet = (msg, url, query, cb) ->
    if missingEnvironmentForApi(msg)
