Install

Works with Drupal: ^10.3 || ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 13.13 KB
MD5: 93863dd359b7ccda3be6b14e6b842f00
SHA-1: a9e5dc60fce354590d15ae3b2a58058f1ebe3ab1
SHA-256: e141dc6710abdbaddd5cccfb3d39dc36983b349b914e7867b0c1e61c7072a93b
Download zip 19.91 KB
MD5: 7860a034ca15303ed03bb01c5e9dba43
SHA-1: be52f65c8fcfa833368d13a8e9f3c5703f0f6e31
SHA-256: 02ec6c933a0dd8ccec73d723a9344393a58229fe26a0f2081e5a3d87dbe22909

Release notes

Fixed issues

Missing Files

1. No composer.json
2. No .gitignore
3. No .cspell.json
4. No .gitlab-ci.yml
5. No config/schema/loginnotification.schema.yml

---
loginnotification.info.yml

6. core_version_requirement: ^10 || ^11 → ^10.3 || ^11
7. Missing package key

---
loginnotification.module

8. Missing declare(strict_types=1)
9. @file description is Module file. — too generic, needs a real description
10. hook_help(), hook_user_login(), hook_mail() should be migrated to
src/Hook/LoginNotificationHooks.php with #[Hook] attributes
11. \Drupal::service(), \Drupal::config(), \Drupal::currentUser(),
\Drupal::logger(), \Drupal::languageManager(), \Drupal::time() static calls in
hooks — services should be injected
12. \Drupal::logger('type') — wrong logger channel, should be
'loginnotification'
13. $fieldValue[0]['value'] == 1 — loose comparison, should be === 1
14. loginnotification_generate_user_logout_link() has trailing }; (semicolon
after closing brace)
15. loginnotification_user_hash() — $timestamp parameter missing PHP type hint

---
loginnotification.install

16. Missing declare(strict_types=1)
17. Empty line after opening brace in loginnotification_uninstall()
18. if ($key == 'loginnotification') — loose comparison, should be ===

---
src/Controller/LoginNotificationController.php

19. Missing declare(strict_types=1)
20. Class docblock LoginNotificationController Controller definition. —
"Controller" repeated
21. logoutUser() missing return type
22. create() missing return type (: static)
23. logoutUser() parameters $uid, $timestamp, $hash missing PHP type hints
24. Property $serviceSession is poorly named — should be $sessionManager

---
src/Form/LoginNotificationConfigurationForm.php

25. Missing declare(strict_types=1)
26. @file docblock is placed after the namespace declaration — must come
before namespace
27. @file description Contains Drupal\loginnotification\Form\... — wrong
pattern, should be descriptive
28. Class docblock Initialization Class LoginNotificationConfigurationForm. —
poor description
29. Missing return types on all methods
30. drupal_flush_all_caches() in submitForm() — unnecessary in a config form,
should not be there

---
config/install/loginnotification.settings.yml

31. notification_mail_body stored as a plain string, but the code accesses
$config->get('notification_mail_body')['value'] — the default should match the
text_format widget structure: {value: '...', format: 'full_html'}

---
config/schema/loginnotification.schema.yml (missing)

32. No schema file — needs to define loginnotification.settings mapping with
notification_mail_body and notification_mail_body_format fields

Created by: zeeshan_khan
Created on: 19 Mar 2026 at 14:06 UTC
Last updated: 19 Mar 2026 at 14:06 UTC
Bug fixes

Other releases