[1.0.x] Designated Proxy User

Created on 7 April 2025, 20 days ago

Although Drupal now allows user accounts to be created without an email address, some parts of the core system and other contributed modules may not work as expected without a valid email address attached to the account.

This module can help in two ways: it can be set to generate a generic, technically valid, but undeliverable email address if the email address field is left blank on account creation, so that managed users do not encounter such errors; and it can allow another designated user account to help manage the email-less user account.

Any emails sent to the invalid placeholder address will be intercepted and sent to the designated contact instead. The message can then be passed on to the intended recipient by other means. This helps to prevent the user from losing access to important information about their user account.

Project link: https://www.drupal.org/project/dpxu

Similar modules:

Subuser (for Drupal 7) offers some similar functionality - https://www.drupal.org/project/subuser .

Designated Proxy User is written entirely independently and is not a port of Subuser.

📌 Task
Status

Active

Component

module

Created by

🇬🇧United Kingdom kewesley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kewesley
  • 🇬🇧United Kingdom kewesley

    I have added Gitlab CI and applied fixes from PHPCS.

  • 🇬🇧United Kingdom kewesley

    For clarity, I want to add that I have applied for coverage before, but the module I used for my previous application 📌 [1.0.x] Alternative Hreflang for SEO Active was much smaller than this one and did not contain sufficient code, so I closed the original application. Now that this project is ready to review I created it as a separate application, I hope that is OK.

  • 🇬🇧United Kingdom kewesley
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    I will review the project tomorrow.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
    • The following points are just a start and don't necessarily encompass all of the changes that may be necessary
    • A specific point may just be an example and may apply in other places
    • A review is about code that does not follow the coding standards, contains possible security issue, or does not correctly use the Drupal API
    • The single review points are not ordered, not even by importance

    src/Controller/ProxyUserController.php

    Since that class does not use any method from the parent class, it does not need to use ControllerBase as parent class. Controllers do not need to have a parent class; as long as they implement \Drupal\Core\DependencyInjection\ContainerInjectionInterface, they are fine.

  • 🇮🇳India vishal.kadam Mumbai

    FILE: src/Form/CreateManagedUserForm.php

      /**
       * The current user service.
       *
       * @var \Drupal\Core\Session\AccountProxyInterface
       */
      protected $currentUser;
    
      /**
       * The configuration factory service.
       *
       * @var \Drupal\Core\Config\ConfigFactoryInterface
       */
      protected $configFactory;

    FILE: src/Form/ManagerContactForm.php

      /**
       * The current user service.
       *
       * @var \Drupal\Core\Session\AccountProxyInterface
       */
      protected $currentUser;

    The parent class FormBase already has properties and methods for the configuration factory, and current user service. There is no need to redefine properties for the same purpose; instead, the parent class methods should be used.

  • 🇬🇧United Kingdom kewesley

    Thank you @avpaderno and @vishal.kadam for the reviews.

    I have updated the module to address your feedback.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    Thank you for your contribution and for your patience with the review process!

    I am going to update your account so you can opt into security advisory coverage any project you create, including the projects you already created.

    These are some recommended readings to help you with maintainership:

    You can find more contributors chatting on Slack or IRC in #drupal-contribute. So, come hang out and stay involved !
    Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review . I encourage you to learn more about that process and join the group of reviewers.

    I thank the dedicated reviewers as well.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇬🇧United Kingdom kewesley

    Thank you very much @avpaderno

Production build 0.71.5 2024