         keys: ['real_name']
         shouldSort: yes
         verbose: no
-      results = f.search github.login
-      result = if results? and results.length >=1 then results[0] else null
-      return result if result
-    return null
+
+      results = f.search name
+      result = if results? and results.length >=1 then results[0] else undefined
+      return result
 
   notificationShouldFire = (notification) ->
     now = new Date

      return

    repo = octo.repos(githubOrg, repo)
    repo.pulls.fetch(state: "open").then (prs) ->
      return Promise.all prs.map (pr) ->
        if user?
          return if not pr.assignee?
          assignee = lookupUserWithGithub pr.assignee
          return if user.toLowerCase() isnt assignee.name.toLowerCase()

        return repo.pulls(pr.number).fetch()
    .then ( prs ) ->
      message = ""
      for pr in prs when pr
        author = lookupUserWithGithub pr.user
        assignee = lookupUserWithGithub pr.assignee
        message+= """
          *[#{pr.title}]* +#{pr.additions} -#{pr.deletions}
          #{pr.htmlUrl}

    robot.brain.set 'github-notifications', notifications

  lookupUserWithGithub = (github) ->
    return if not github

    github.fetch().then (user) ->
      name = user.name or github.login
      users = robot.brain.users()
      users = _(users).keys().map (id) ->
        u = users[id]
