I need to override the user_provider plugin from the basicshib contrib module: https://git.drupalcode.org/project/basicshib/-/tree/2.0.x
All of the instructions I am finding instruct me to use the alterHook defined by the plugin manager but it is not defined. I believe the annotation system is in play but I cannot find clear instructions on what to do once I have written my new plugin.
What I have done so far:
- created a new module ‘basic_shib_extend’
added a plugin at basic_shib_extend/src/Plugin/basicshib/user_provider/CustomUserProviderPlugin.php
<?php namespace Drupalbasic_shib_extendPluginbasicshibuser_provider; use DrupalbasicshibAnnotationBasicShibUserProvider; use Drupalbasicshibuser_providerUserProviderPluginDefault; /** * Class CustomUserProviderPlugin * * @package Drupalbasic_shib_extendPluginbasicshibuser_provider * * @BasicShibUserProvider( * id = "basicshib", * title = "Custom user provider" * ) */ class CustomUserProviderPlugin extends UserProviderPluginDefault { /** * @inheritDoc */ public function createUser($name, $mail) { return $this->user_storage ->create([ 'name' => $name, 'mail' => $mail, 'status' => 0, 'init' => $mail, ]); } }
What additional steps do I need to take to get this plugin to be used instead of the default by the basicshib package. Thanks for any guidance.