Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- authenticate: function(username, password){
- return this.find({'account.username': username}).first(function(user){
- if(user.account.username == user.account.username && user.account.password == password.md5) this.result(user);
- else this.result(false);
- });
- },
- existByUsername: function (username) {
- return this.find({'account.username': username}).first(function(user){
- if(user.account.username.length) this.result(user);
- else this.result(false);
- });
- },
Add Comment
Please, Sign In to add comment