           (signature Function)
           (signature Object, Function)
         ]
-        fetchGroupRoles:
-          (signature String, Function)
         fetchGroupsWithPendingInvitations: [
-          (signature Function)
-          (signature Object, Function)
-        ]
-        fetchGroupsWithPendingRequests: [
           (signature Function)
           (signature Object, Function)
         ]

      else
        unmarkAsTroll {accountId}, callback

  flagAccount: secure (client, flag, callback)->
    {delegate} = client.connection
    JAccount.taint @getId()
    if delegate.can 'flag', this
      @update {$addToSet: globalFlags: flag}, callback
    else
      callback new KodingError 'Access denied'

  unflagAccount: secure (client, flag, callback)->
    {delegate} = client.connection
    JAccount.taint @getId()
    if delegate.can 'flag', this
      @update {$pullAll: globalFlags: [flag]}, callback
    else
      callback new KodingError 'Access denied'

  updateFlags: secure (client, flags, callback)->
    {delegate} = client.connection

      sort    : 'profile.firstName' : 1
    }, callback


  setEmailPreferences: (user, prefs, callback)->
    current = user.getAt('emailFrequency') or {}
