docs: function cmd_register(args, done) {
      var seneca = this
      var userent = seneca.make(user_canon)
      var user = userent.make$()
  
      user.nick = args.nick || args.username || args.email
      user.email = args.email
      user.name = args.name || ''
      user.active = void 0 === args.active ? true : args.active
      user.when = new Date().toISOString()
      user.failedLoginCount = 0
  
      if (options.confirm) {
        user.confirmed = args.confirmed || false
        user.confirmcode = Uuid()
      }
  
      conditionalExtend(user, args)
  
      return checknick(function() {
        checkemail(function() {
          saveuser()
        })
      })
  
      // unsafe nick unique check, data store should also enforce !!
      function checknick(next) {
        if (user.nick) {
          userent.load$({ nick: user.nick }, function(err, userfound) {
            if (err) return done(err, { ok: false, user: user })
            if (userfound)
              return done(null, {
                ok: false,
                why: 'nick-exists',
                nick: args.nick
              })
            next()
          })
          return
        }
        next()
      }
  
      // unsafe email unique check, data store should also enforce !!
      function checkemail(next) {
        if (user.email) {
          userent.load$({ email: user.email }, function(err, userfound) {
            if (err) return done(err, { ok: false, user: user })
            if (userfound)
              return done(null, {
                ok: false,
                why: 'email-exists',
                nick: args.nick
              })
            next()
          })
          return
        }
        next()
      }
  
      function saveuser() {
        prepare_password_data(args, function(err, data) {
          if (err) {
            return done(err)
          }
  
          if (!data.ok) {
            return done(null, data)
          }
  
          user.salt = data.salt
          user.pass = data.pass
  
          // before saving user some cleanup should be done
          cleanUser(user, function(err, user) {
            if (err) {
              return done(err)
            }
  
            user.save$(function(err, user) {
              if (err) {
                return done(err)
              }
  
              seneca.log.debug('register', user.nick, user.email, user)
              done(null, { ok: true, user: user })
            })
          })
        })
      }
    }