    * @param {Object} (filter) The object keys you wish to return (null is all)
    * @param {Function} (fn) The callback function
   ###
-  all: (filter=null, fn) =>
+  all: (filter={}, fn) =>
+    if typeof filter == "function" then fn = filter
     @current = null
-    filter = {} unless filter
     @list (err, usernames) =>
       if (filter.name and Object.keys(filter).length is 1) or err
         return fn(err, usernames)

   * @param {Object} (obj) The object to add
   * @param {Function} (fn) The callback function
  ###
  save: (fn, update_secret=false) =>
    return fn(null, false) unless @current

    if typeof @current.name == "string"

   * @param {Function} (fn) The callback function
  ###
  setup_directories: (user, fn) =>
    fs.mkdir [@config.get('repository'), user.username].join('/'), () =>



module.exports = User
