<NME> user.js
<BEF> var util = require("util"),
    BaseData = require("./base"),
    mongoose = require('mongoose'),
    kits = require("../kits");

function UserData(schema) {
    this.Schema = schema;
    BaseData.call(this, mongoose.model("user", schema));

    /**
     * add user
     * @param name
     * @param email
     * @param password
     * @param callback
     */
    this.add = function (name, email, password, callback) {
        var salt = kits.utils.short_guid();
        var db_password = kits.utils.md5(password + salt);
        var user = new this.model({
            id      : kits.utils.short_guid(),
            name    : name,
            email   : email,
            password: db_password,
            salt    : salt,
            role    : constant.user.role.supper_admin
        });
        user.save(function (err) {
            return callback(err);
        });
    };

    this.update = function (uid, name, desc, callback) {
        var update = {
            $set: {
                name       : name,
                desc       : desc,
                update_date: new Date().getTime()
            }
        };
        this.model.update({id: uid}, update, callback);
    };

    this.update_avatar = function (uid, type, path, callback) {
        var update = {
            $set: {
                avatar     : {
                    type: type,
                    path: path
                },
                update_date: new Date().getTime()
            }
        };
        this.model.update({id: uid}, update, callback);
    };

    this.update_passowrd = function (uid, password, callback) {
        var update = {
            $set: {
                password   : password,
                update_date: new Date().getTime()
            }
        };
        this.model.update({id: uid}, update, callback);
    };

    /**
     * check user by name and email
     * @param name
     * @param email
     * @param callback
     */
    this.check = function (name, email, callback) {
        var name_pattern = '^' + name + '$';
        var email_pattern = '^' + email + '$';
        if (email.indexOf("+") >= 0) {
            email_pattern = email_pattern.replace(/\+/i, "\\+");
        }
        var query = {
            "$or"     : [
                { name: {$regex: name_pattern, $options: 'i'}},
                { email: {$regex: email_pattern, $options: 'i'}}
            ],
            is_deleted: 0
        };

        this.model.findOne(query, function (err, user) {
            return callback(err, user);
        });
    };

    this.get_list_by_uids = function (uids, callback) {
        this.model.find({id: {$in: uids}, is_deleted: kits.constant.is_deleted.no}, callback);
    };

    this.get_or_create = function (profile, callback) {
        callback(null, profile);
    }
};

util.inherits(UserData, BaseData);

module.exports = UserData;
    BaseData = require("./base"),
    mongoose = require('mongoose'),
    kits = require("../kits");

function UserData(schema) {
    this.Schema = schema;
    BaseData.call(this, mongoose.model("user", schema));

    /**
     * add user
     * @param name
     * @param email
     * @param password
     * @param callback
     */
    this.add = function (name, email, password, callback) {
        var salt = kits.utils.short_guid();
        var db_password = kits.utils.md5(password + salt);
        var user = new this.model({
            id      : kits.utils.short_guid(),
            name    : name,
            email   : email,
            password: db_password,
            salt    : salt,
            role    : kits.constant.user.role.supper_admin
        });
        user.save(function (err) {
            return callback(err);
        });
    };

    this.update = function (uid, name, desc, callback) {
        var update = {
            $set: {
                name       : name,
                desc       : desc,
                update_date: new Date().getTime()
            }
        };
        this.model.update({id: uid}, update, callback);
    };

    this.update_avatar = function (uid, type, path, callback) {
        var update = {
            $set: {
                avatar     : {
                    type: type,
                    path: path
                },
                update_date: new Date().getTime()
            }
        };
        this.model.update({id: uid}, update, callback);
    };

    this.update_passowrd = function (uid, password, callback) {
        var update = {
            $set: {
                password   : password,
                update_date: new Date().getTime()
            }
        };
        this.model.update({id: uid}, update, callback);
    };

    /**
     * check user by name and email
     * @param name
     * @param email
     * @param callback
     */
    this.check = function (name, email, callback) {
        var name_pattern = '^' + name + '$';
        var email_pattern = '^' + email + '$';
        if (email.indexOf("+") >= 0) {
            email_pattern = email_pattern.replace(/\+/i, "\\+");
        }
        var query = {
            "$or"     : [
                { name: {$regex: name_pattern, $options: 'i'}},
                { email: {$regex: email_pattern, $options: 'i'}}
            ],
            is_deleted: 0
        };

        this.model.findOne(query, function (err, user) {
            return callback(err, user);
        });
    };

    this.get_list_by_uids = function (uids, callback) {
        this.model.find({id: {$in: uids}, is_deleted: kits.constant.is_deleted.no}, callback);
    };

    this.get_or_create = function (profile, callback) {
        callback(null, profile);
    }
};

util.inherits(UserData, BaseData);

module.exports = UserData;
<MSG> fix bug signup

<DFF> @@ -1,1 +1,1 @@
-var util = require("util"),
    BaseData = require("./base"),
    mongoose = require('mongoose'),
    kits = require("../kits");

function UserData(schema) {
    this.Schema = schema;
    BaseData.call(this, mongoose.model("user", schema));

    /**
     * add user
     * @param name
     * @param email
     * @param password
     * @param callback
     */
    this.add = function (name, email, password, callback) {
        var salt = kits.utils.short_guid();
        var db_password = kits.utils.md5(password + salt);
        var user = new this.model({
            id      : kits.utils.short_guid(),
            name    : name,
            email   : email,
            password: db_password,
            salt    : salt,
            role    : constant.user.role.supper_admin
        });
        user.save(function (err) {
            return callback(err);
        });
    };

    this.update = function (uid, name, desc, callback) {
        var update = {
            $set: {
                name       : name,
                desc       : desc,
                update_date: new Date().getTime()
            }
        };
        this.model.update({id: uid}, update, callback);
    };

    this.update_avatar = function (uid, type, path, callback) {
        var update = {
            $set: {
                avatar     : {
                    type: type,
                    path: path
                },
                update_date: new Date().getTime()
            }
        };
        this.model.update({id: uid}, update, callback);
    };

    this.update_passowrd = function (uid, password, callback) {
        var update = {
            $set: {
                password   : password,
                update_date: new Date().getTime()
            }
        };
        this.model.update({id: uid}, update, callback);
    };

    /**
     * check user by name and email
     * @param name
     * @param email
     * @param callback
     */
    this.check = function (name, email, callback) {
        var name_pattern = '^' + name + '$';
        var email_pattern = '^' + email + '$';
        if (email.indexOf("+") >= 0) {
            email_pattern = email_pattern.replace(/\+/i, "\\+");
        }
        var query = {
            "$or"     : [
                { name: {$regex: name_pattern, $options: 'i'}},
                { email: {$regex: email_pattern, $options: 'i'}}
            ],
            is_deleted: 0
        };

        this.model.findOne(query, function (err, user) {
            return callback(err, user);
        });
    };

    this.get_list_by_uids = function (uids, callback) {
        this.model.find({id: {$in: uids}, is_deleted: kits.constant.is_deleted.no}, callback);
    };

    this.get_or_create = function (profile, callback) {
        callback(null, profile);
    }
};

util.inherits(UserData, BaseData);

module.exports = UserData;
\ No newline at end of file
+var util = require("util"),
    BaseData = require("./base"),
    mongoose = require('mongoose'),
    kits = require("../kits");

function UserData(schema) {
    this.Schema = schema;
    BaseData.call(this, mongoose.model("user", schema));

    /**
     * add user
     * @param name
     * @param email
     * @param password
     * @param callback
     */
    this.add = function (name, email, password, callback) {
        var salt = kits.utils.short_guid();
        var db_password = kits.utils.md5(password + salt);
        var user = new this.model({
            id      : kits.utils.short_guid(),
            name    : name,
            email   : email,
            password: db_password,
            salt    : salt,
            role    : kits.constant.user.role.supper_admin
        });
        user.save(function (err) {
            return callback(err);
        });
    };

    this.update = function (uid, name, desc, callback) {
        var update = {
            $set: {
                name       : name,
                desc       : desc,
                update_date: new Date().getTime()
            }
        };
        this.model.update({id: uid}, update, callback);
    };

    this.update_avatar = function (uid, type, path, callback) {
        var update = {
            $set: {
                avatar     : {
                    type: type,
                    path: path
                },
                update_date: new Date().getTime()
            }
        };
        this.model.update({id: uid}, update, callback);
    };

    this.update_passowrd = function (uid, password, callback) {
        var update = {
            $set: {
                password   : password,
                update_date: new Date().getTime()
            }
        };
        this.model.update({id: uid}, update, callback);
    };

    /**
     * check user by name and email
     * @param name
     * @param email
     * @param callback
     */
    this.check = function (name, email, callback) {
        var name_pattern = '^' + name + '$';
        var email_pattern = '^' + email + '$';
        if (email.indexOf("+") >= 0) {
            email_pattern = email_pattern.replace(/\+/i, "\\+");
        }
        var query = {
            "$or"     : [
                { name: {$regex: name_pattern, $options: 'i'}},
                { email: {$regex: email_pattern, $options: 'i'}}
            ],
            is_deleted: 0
        };

        this.model.findOne(query, function (err, user) {
            return callback(err, user);
        });
    };

    this.get_list_by_uids = function (uids, callback) {
        this.model.find({id: {$in: uids}, is_deleted: kits.constant.is_deleted.no}, callback);
    };

    this.get_or_create = function (profile, callback) {
        callback(null, profile);
    }
};

util.inherits(UserData, BaseData);

module.exports = UserData;
\ No newline at end of file

fix bug signup