diff options
Diffstat (limited to 'server/models/user.js')
-rw-r--r-- | server/models/user.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/models/user.js b/server/models/user.js index 0bbd638d4..351ffef86 100644 --- a/server/models/user.js +++ b/server/models/user.js | |||
@@ -21,6 +21,7 @@ UserSchema.methods = { | |||
21 | UserSchema.statics = { | 21 | UserSchema.statics = { |
22 | getByUsernameAndPassword: getByUsernameAndPassword, | 22 | getByUsernameAndPassword: getByUsernameAndPassword, |
23 | list: list, | 23 | list: list, |
24 | loadById: loadById, | ||
24 | loadByUsername: loadByUsername | 25 | loadByUsername: loadByUsername |
25 | } | 26 | } |
26 | 27 | ||
@@ -36,6 +37,10 @@ function list (callback) { | |||
36 | return this.find(callback) | 37 | return this.find(callback) |
37 | } | 38 | } |
38 | 39 | ||
40 | function loadById (id, callback) { | ||
41 | return this.findById(id, callback) | ||
42 | } | ||
43 | |||
39 | function loadByUsername (username, callback) { | 44 | function loadByUsername (username, callback) { |
40 | return this.findOne({ username: username }, callback) | 45 | return this.findOne({ username: username }, callback) |
41 | } | 46 | } |