         SocialAccount.update {
           id            : @socialApiId
           nick          : @profile.nickname
-          settings      : {shareLocation: fields.shareLocation}
+          settings      : { shareLocation: fields.shareLocation }
         }, callback
 
     else
       callback new KodingError 'Access denied'
 
 
-  getFullName:->
-    {firstName, lastName} = @data.profile
+  getFullName: ->
+    { firstName, lastName } = @data.profile
     return "#{firstName} #{lastName}"
 
-  fetchStorage$: (name, callback)->
+  fetchStorage$: (name, callback) ->
 
     @fetchStorage { 'data.name' : name }, callback
 
-  fetchStorages$: (whitelist=[], callback)->
+  fetchStorages$: (whitelist = [], callback) ->
 
     options = if whitelist.length then { 'data.name' : $in : whitelist } else {}
 
     @fetchStorages options, callback
 
-  store: secure (client, {name, content}, callback)->
+  store: secure (client, { name, content }, callback) ->
     unless @equals client.connection.delegate
-      return callback new KodingError "Attempt to access unauthorized storage"
-
-    @_store {name, content}, callback
-
-  unstore: secure (client, name, callback)->
+      return callback new KodingError 'Attempt to access unauthorized storage'
+
+    @_store { name, content }, callback
+
+  unstore: secure (client, name, callback) ->
 
     unless @equals client.connection.delegate
-      return callback new KodingError "Attempt to remove unauthorized storage"
-
-    @fetchStorage { 'data.name' : name }, (err, storage)=>
+      return callback new KodingError 'Attempt to remove unauthorized storage'
+
+    @fetchStorage { 'data.name' : name }, (err, storage) ->
       console.error err, storage  if err
       return callback err  if err
       unless storage
-        return callback new KodingError "No such storage"
+        return callback new KodingError 'No such storage'
 
       storage.remove callback
 
-  unstoreAll: (callback)->
-    @fetchStorages [], (err, storages)->
+  unstoreAll: (callback) ->
+    @fetchStorages [], (err, storages) ->
       daisy queue = storages.map (storage) ->
         -> storage.remove -> queue.next()
       queue.push -> callback null
 
-  _store: ({name, content}, callback)->
-    @fetchStorage { 'data.name' : name }, (err, storage)=>
+  _store: ({ name, content }, callback) ->
+    @fetchStorage { 'data.name' : name }, (err, storage) =>
       if err
-        return callback new KodingError "Attempt to access storage failed"
+        return callback new KodingError 'Attempt to access storage failed'
       else if storage
-        storage.update $set: {content}, (err) -> callback err, storage
+        storage.update { $set: { content } }, (err) -> callback err, storage
       else
-        storage = new JStorage {name, content}
-        storage.save (err)=>
+        storage = new JStorage { name, content }
+        storage.save (err) =>
           return callback err  if err
           rel = new Relationship
             targetId    : storage.getId()


  ## NEWER IMPLEMENATION: Fetch ids from graph db, get items from document db.

  unlinkOauth: secure (client, provider, callback)->
    {delegate} = client.connection
    isMine     = @equals delegate
    if isMine
      @fetchUser (err, user)=>
        return callback err  if err

        query = {}
        query["foreignAuth.#{provider}"] = ""
        user.update $unset: query, (err)=>
          return callback err  if err
          @oauthDeleteCallback provider, user, callback
    else
      callback new KodingError 'Access denied'

  oauthDeleteCallback: (provider, user, callback)->
    if provider is "google"
      user.fetchAccount 'koding', (err, account)->
        return callback err  if err
        JReferrableEmail = require "./referrableemail"
        JReferrableEmail.delete user.username, callback
    else
      callback()

  # we are using this in sorting members list..
  updateMetaModifiedAt: (callback)->
    @update $set: 'meta.modifiedAt': new Date, callback

  fetchEmail: secure (client, callback)->
    {delegate} = client.connection
    isMine     = @equals delegate
    if isMine
      @fetchUser (err, user)->
        return callback err  if err
        callback null, user?.email
    else

    else
      callback new KodingError 'Access denied'

  unblockUser: secure (client, accountIdOrNickname, callback) ->
    { delegate } = client.connection
    if delegate.can('flag', this) and accountIdOrNickname?
      @fetchUserByAccountIdOrNickname accountIdOrNickname, (err, { user }) ->
        return callback err if err
        user.unblock callback
    else
