             queue.next()
         else process.nextTick -> queue.next()
       =>
-        @verifyEnrollmentEligibility {email: user.email, inviteCode}, (err, isEligible, invite_) =>
+        @verifyEnrollmentEligibility {email: user.email, inviteCode}, (err, { isEligible, invite: invite_ }) =>
           return callback err  if err
           invite = invite_
           queue.next()

  getHash =(value)->
    require('crypto').createHash('md5').update(value.toLowerCase()).digest('hex')

  @whoami = secure ({connection:{delegate}}, callback)-> callback delegate

  checkBlockedStatus = (user, callback)->
    if user.status is 'blocked'

          if err or !invite?
            callback createKodingError 'Invalid invitation ID!'
          else
            callback null, { isEligible: yes, invite }
      else
        callback null, isEligible: yes

  @addToGroup = (account, slug, email, invite, callback)->
    JGroup.one {slug}, (err, group)->
