Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This module allows users to log in using field data values, administrators can customize the fields allowed to log in.
Special fields can use plug-ins or hooks to query the user UID to achieve login, for example: Phone number (field). You can also use any data to log in,
you only need to query and output the user's UID.
Comments
Comment #2
vishal.kadamThank you for applying!
Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.
The important notes are the following.
phpcs --standard=Drupal,DrupalPractice
on the project, which alone fixes most of what reviewers would report.To the reviewers
Please read How to review security advisory coverage applications, Application workflow, What to cover in an application review, and Tools to use for reviews.
The important notes are the following.
For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues.
Comment #3
vishal.kadamComment #4
Rushikesh Raval CreditAttribution: Rushikesh Raval commentedSolve phpcs Error
phpcs --standard=Drupal,DrupalPractice web/modules/contrib/field_login/
FILE: web/modules/contrib/field_login/src/Form/FieldLoginSettingsForm.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
74 | WARNING | \Drupal calls should be avoided in classes, use dependency
| | injection instead
--------------------------------------------------------------------------------
FILE: .../drupal104/web/modules/contrib/field_login/src/FieldLoginPluginManager.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------
47 | WARNING | \Drupal calls should be avoided in classes, use dependency
| | injection instead
48 | WARNING | Unused variable $plugin_id.
64 | ERROR | Missing parameter comment
--------------------------------------------------------------------------------
FILE: web/modules/contrib/field_login/src/FieldLoginPluginManagerInterface.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found
| | "\r\n"
7 | ERROR | [x] Missing interface doc comment
9 | ERROR | [x] Missing function doc comment
11 | ERROR | [x] Missing function doc comment
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: web/modules/contrib/field_login/src/UserAuthDecorator.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 4 LINES
--------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first
| | wrong one is
| | Drupal\Core\DependencyInjection\DependencySerializationTrait.
55 | ERROR | [ ] Parameter $flood is not described in comment
55 | ERROR | [ ] Parameter $config_factory is not described in comment
63 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 4
| | spaces
107 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: web/modules/contrib/field_login/src/UserVerificationInterface.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found
| | "\r\n"
5 | WARNING | [x] Unused use statement
9 | WARNING | [ ] The class short comment should describe what the class does
| | and not simply repeat the class name
15 | ERROR | [ ] Missing parameter comment
17 | ERROR | [x] Additional blank lines found at end of doc comment
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: web/modules/contrib/field_login/src/UserVerification.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
50 | ERROR | [x] Parameter comment must end with a full stop
52 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 4
| | spaces
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: web/modules/contrib/field_login/field_login.api.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
13 | ERROR | Missing parameter type
--------------------------------------------------------------------------------
Time: 420ms; Memory: 10MB
Comment #5
qiutuo CreditAttribution: qiutuo commentedHello, the above problem has been fixed, and there is no other prompt to execute phpcs.
Comment #6
vishal.kadam1. FILE: field_login.info.yml
project: 'field_login'
Remove "project" from the info file, it will be added by drupal.org packaging automatically
2. FILE: field_login.module
Only string literals should be passed to t()
3. FILE: src/UserVerification.php
FILE: src/UserAuthDecorator.php
Function and method declarations are written on a single line.
4. FILE: src/Form/FieldLoginSettingsForm.php
The documentation comment for constructors is not mandatory anymore, If it is given, the description must be Constructs a new [class name] object. where [class name] includes the class namespace.
Comment #7
qiutuo CreditAttribution: qiutuo commentedHello, I have corrected the above issue.
Comment #8
vishal.kadamIf you changed what has been reported, please change the status to Needs review. In this way, reviewers will know everything has been changed and can be reviewed again.
Comment #9
qiutuo CreditAttribution: qiutuo commentedComment #10
apadernoI do not have time for a deeper review. I just wanted to report this.
$form['name']['#title'] = t('@label', ['@label' => $username_label]);
does not do any translation and it is exactly as using$form['name']['#title'] = $username_label;
Configuration objects are translatable, but translating them does not involve calling
t()
. There is documentation about translating configuration objects; I will report here the documentation link when I find it.Comment #11
apadernoSee Translating configuration.