def add_register_user(
        self, username, first_name, last_name, email, password="", hashed_password=""
    ):
        """
        Add a registration request for the user.

        :rtype : RegisterUser
        """
        register_user = self.registeruser_model()
        register_user.username = username
        register_user.email = email
        register_user.first_name = first_name
        register_user.last_name = last_name
        if hashed_password:
            register_user.password = hashed_password
        else:
            register_user.password = generate_password_hash(
                password=password,
                method=self.appbuilder.get_app.config.get(
                    "FAB_PASSWORD_HASH_METHOD", "scrypt"
                ),
                salt_length=self.appbuilder.get_app.config.get(
                    "FAB_PASSWORD_HASH_SALT_LENGTH", 16
                ),
            )
        register_user.registration_hash = str(uuid.uuid1())
        try:
            self.get_session.add(register_user)
            self.get_session.commit()
            return register_user
        except Exception as e:
            log.error(c.LOGMSG_ERR_SEC_ADD_REGISTER_USER, e)
            self.appbuilder.get_session.rollback()
            return None

        Add a registration request for the user.

        :rtype : RegisterUser
        
flask_appbuilder/security/sqla/manager.py