Send user notification module, allows administrator to send notification message to website users about any information, coupons, vouchers, or any type of activities to their mails.

This module gives facility to admin user to configure the Email message from the back-end. It also uses the tokens that will really help to admin to create the dynamic email message.
How to Use

After Enabling the module go to config page. [domain-url]/admin/config/people/accounts/notification-setting
And setup the email subject, body. You can also use tokens to prepare the subject as well as body.

After Successful setup the mail go to the people page [domain-url]/admin/people
and select the number of people which you want to forward the message.
and select the "Send notification message to user(s)" from Action drop-down.
And the message will send to selected users or all users.

Project link

https://www.drupal.org/project/usernotification

Git instructions

git clone --branch 8.x-1.x https://git.drupalcode.org/project/usernotification.git

PAReview checklist

https://pareview.sh/pareview/https-git.drupal.org-project-usernotificati...

Comments

AnokR created an issue. See original summary.

AnokR’s picture

Status: Needs review » Needs work
AnokR’s picture

Issue summary: View changes
AnokR’s picture

Issue summary: View changes
Status: Needs work » Needs review
AnokR’s picture

Issue summary: View changes
apaderno’s picture

Assigned: AnokR » Unassigned
Issue summary: View changes
vuil’s picture

Status: Needs review » Needs work

Thank you for the contribution!

I have not found any security related issues, but I have the following suggestions:

(1.)

There is a wrong path way. Please correct the project's module folder name.
The used (wrong) module path is usernotification instead of send_user_notification.

When we try to enable the module now we receive the following error comes from that wrong folder name:

$ ./vendor/bin/drush en usernotification
In PmCommands.php line 247:
  Unable to install modules usernotification due to missing modules usernotification.

(2.)

A question: why you use .= instead of = in send_user_notification.module file fragment:
$message['subject'] .= PlainTextOutput::renderFromHtml($token_service->replace($mail_config->get('subject'), $variables, $token_options));

(3.)

Please replace the code in /src/Plugin/Action/SendUserNotification.php:
if ($account !== FALSE) {
with
if ($account) {

(4.)

Increase your code base with usage of Dependency Injection instead of \Drupal calls in classes. Please use dependency injection (DI) instead of:

  • \Drupal::config()
  • \Drupal::messenger()
  • etc.

in your classes.

Only (1.) is required for the successful security review by myself.
(2.), (3.) and (4.) are only suggestions like better programming practices.

AnokR’s picture

Thank you @ilchovuchkov for your quick reply I will fix it and get back to you.

Thanks again!

AnokR’s picture

Status: Needs work » Needs review
vuil’s picture

Status: Needs review » Reviewed & tested by the community

I didn't find any security related issue into the code.

I set the issue's status to Reviewed & tested by the community.
Thank you. Good job!

AnokR’s picture

Thank you so much @vuil.

apaderno’s picture

Assigned: Unassigned » apaderno
Status: Reviewed & tested by the community » Fixed

Thank you for your contribution! I am going to update your account.

These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
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 all the dedicated reviewers as well.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.