     logger.info "setting userList ", @_id, userList
     await @update({$set: {"userList": userList}})
     @userList = userList
-
 
 compareLevels = (a, b) ->
     if a.length != b.length

    res.login = @cf.login
    @update({$set: {cf: res}})

usersSchema.methods.updateGraduateYears = ->
    id = await RegisteredUser.find({informaticsId: @_id})
    informaticsUser = await InformaticsUser.getUser(id[0].informaticsUsername, id[0].informaticsPassword)
    data = await informaticsUser.getData()

    logger.info "Updated cf ratings"

usersSchema.statics.updateAllGraduateYears = () ->
   promises = []
   for u in await User.findAll()
      if !u.graduateYear
        promises.append(u.updateGraduateYear())
   awaitAll promises
   logger.info "Updated graduateYear"

usersSchema.index
