         @apiSecret = buf.toString 'base64'
         @save callback
 
- 
+
   schema.pre 'save', (next) ->
     user = @
 

      roles: [{type: 'ObjectId', ref: 'Role'}]
    options:
      strict: false
      
  schema = dal.schemaFactory modelDefinition
  modelDefinition.schema = schema



  comparePassword = (user, candidate, callback) ->
    if model.comparePassword?
      model.comparePassword(user, candidate, callback)
    else
      if candidate?
        if user.password?
