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
Comment #2
AnokR CreditAttribution: AnokR as a volunteer commentedComment #3
AnokR CreditAttribution: AnokR as a volunteer commentedComment #4
AnokR CreditAttribution: AnokR as a volunteer commentedComment #5
AnokR CreditAttribution: AnokR as a volunteer commentedComment #6
apadernoComment #7
vuilThank 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 ofsend_user_notification
.When we try to enable the module now we receive the following error comes from that wrong folder name:
(2.)
A question: why you use
.=
instead of=
insend_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()
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.
Comment #8
AnokR CreditAttribution: AnokR as a volunteer commentedThank you @ilchovuchkov for your quick reply I will fix it and get back to you.
Thanks again!
Comment #9
AnokR CreditAttribution: AnokR as a volunteer commentedComment #10
vuilI 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!
Comment #11
AnokR CreditAttribution: AnokR as a volunteer commentedThank you so much @vuil.
Comment #12
apadernoThank 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.