protected function _beforeRegister(EntityInterface $entity, $options = []) {
		$options = Hash::merge($this->_config['register'], $options);

		$schema = $this->_table->getSchema();
		$columnType = $schema->getColumnType($this->_table->getPrimaryKey());

		if ($this->_config['useUuid'] === true && $columnType !== 'integer') {
			$primaryKey = $this->_table->getPrimaryKey();
			$entity->set($primaryKey, Text::uuid());
		}

		if ($options['userActive'] === true) {
			$entity->set($this->_field('active'), true);
		}

		$this->_emailVerification($entity, $options);

		if (!isset($entity->{$this->_field('role')})) {
			$entity->set($this->_field('role'), $options['defaultRole']);
		}

		if ($options['generatePassword'] === true) {
			$password = $this->generatePassword();
			$entity->set($this->_field('password'), $password);
			$entity->set('clear_password', $password);
		}

		if ($options['hashPassword'] === true) {
			$entity->set($this->_field('password'), $this->hashPassword($entity->get($this->_field('password'))));
		}

		return $entity;
	}