php drupal-check.phar modules/contrib/user_delete_reassign/
3/3 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ ---------------------------------------------------------------------------
Line user_delete_reassign.module
------ ---------------------------------------------------------------------------
131 Call to deprecated method getUsername() of class Drupal\user\Entity\User.
------ ---------------------------------------------------------------------------
[ERROR] Found 1 error | Comment | File | Size | Author |
|---|---|---|---|
| #5 | deprecated-3072115-5.patch | 730 bytes | sergiu stici |
| #2 | deprecated-3072115-2.patch | 730 bytes | sergiu stici |
Comments
Comment #2
sergiu stici commentedHere is the patch, please review.
Comment #3
joey-santiago commentedthanks Sergiu!
sure, i'll test it asap.
Comment #4
hkirsman commentedIn the comments of getUsername() it says that there are 2 options: getAccountName() or getDisplayName()
I've implemented hook_user_format_name_alter() and changed how the username looks wherever it's displayed. getAccountName() is ignoring that hook and just displays the username field.
Long story short, let's use getDisplayName() instead
Comment #5
sergiu stici commentedComment #6
hkirsman commentedComment #8
hkirsman commentedThank you @sergiu-stici!
Comment #9
hkirsman commentedComment #10
hkirsman commented