code: function destroyByAuthor(unfilteredOptions) {
              let options = this.filterOptions(unfilteredOptions, 'destroyByAuthor', {extraAllowedProperties: ['id']}),
                  postCollection = Posts.forge(),
                  authorId = options.id;
  
              if (!authorId) {
                  return Promise.reject(new common.errors.NotFoundError({
                      message: common.i18n.t('errors.models.post.noUserFound')
                  }));
              }
  
              // CASE: if you are the primary author of a post, the whole post and it's relations get's deleted.
              //       `posts_authors` are automatically removed (bookshelf-relations)
              // CASE: if you are the secondary author of a post, you are just deleted as author.
              //       must happen manually
              const destroyPost = (() => {
                  return postCollection
                      .query('where', 'author_id', '=', authorId)
                      .fetch(options)
                      .call('invokeThen', 'destroy', options)
                      .then(function (response) {
                          return (options.transacting || ghostBookshelf.knex)('posts_authors')
                              .where('author_id', authorId)
                              .del()
                              .return(response);
                      })
                      .catch((err) => {
                          throw new common.errors.GhostError({err: err});
                      });
              });
  
              if (!options.transacting) {
                  return ghostBookshelf.transaction((transacting) => {
                      options.transacting = transacting;
                      return destroyPost();
                  });
              }
  
              return destroyPost();
          }
docs: ### destroyByAuthor
  @param  {[type]} options has context and id. Context is the user doing the destroy, id is the user to destroy