Skip to content
Snippets Groups Projects
Commit c85cabe8 authored by Jürgen Haas's avatar Jürgen Haas
Browse files

Issue #3347597: Error generating hashes

parent 27d30da5
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ namespace Drupal\user_hash\Plugin\Action;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Action\ActionBase;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Cache\Cache;
use Symfony\Component\DependencyInjection\ContainerInterface;
......@@ -17,7 +18,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* type = "user"
* )
*/
class GenerateUserHash extends ActionBase {
class GenerateUserHash extends ActionBase implements ContainerFactoryPluginInterface {
/**
* @var \Drupal\user_hash\Services|object|null
......@@ -34,7 +35,7 @@ class GenerateUserHash extends ActionBase {
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): GenerateUserHash {
/** @var \Drupal\user_hash\Plugin\Action\GenerateUserHash $instance */
$instance = parent::create($container, $configuration, $plugin_id, $plugin_definition);
$instance = new static($configuration, $plugin_id, $plugin_definition);
$instance->userHashService = $container->get('user_hash.services');
$instance->userData = $container->get('user.data');
return $instance;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment