I encountered an error reported in an another module that adds a submit handler to the login form:
Warning: trim() expects parameter 1 to be string, array given in Drupal\ldap_authentication\Controller\LoginValidator->validateLogin() (line 81 of modules/contrib/ldap/ldap_authentication/src/Controller/LoginValidator.php).
Upon investigation I found that the submit handler super_login_user_login_validate() was the first in the stack, and that if an email was used and thus kicking off the code in this function that the username was replaced in the 'name' field as expected, but as an array, which is not (at least in our case).
The attached patch removes the array casting, keeping the name value a string as at least the other modules in our system expects, removing the error.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | login-form-set-vallue-fix-2912768--1.patch | 5.92 KB | ironsizide |
Comments
Comment #2
ironsizide commentedComment #5
3cwebdev commentedThank you. Patch has been committed to DEV for further testing.
Comment #6
3cwebdev commentedComment #7
neclimdulfixed?