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.
It would be nice to be able to enter the uid instead of username when masquerading as another user.
Many times I'm looking at table data (via phpMyAdmin) that contains uid, but not username. So to masquerade as that user, I first have to find it in the users table.
Comment | File | Size | Author |
---|---|---|---|
#7 | user_id_input-92950-#7.patch | 3.13 KB | rdatar |
Comments
Comment #1
sunI think this is a good idea.
Comment #2
deekayen CreditAttribution: deekayen commentedMy concern is supporting with themed usernames like with http://drupal.org/project/realname, so just clarifying this wouldn't switch to uid-only.
Comment #3
sunOh yeah, sorry for the confusion. I definitely meant "in addition to". :)
The concrete use-case I'm commonly facing is that I only have a user's ID through the means of a support ticket from a completely separate helpdesk system. In such cases, it would be great if I could just simply paste the uid into the form field and hit ENTER.
Comment #4
andypostModule already using core's
entity_autocomplete
element that support name and IDComment #5
andypostActually not
Comment #6
rdatar CreditAttribution: rdatar as a volunteer and at Faichi Solutions Pvt Ltd commentedComment #7
rdatar CreditAttribution: rdatar as a volunteer and at Faichi Solutions Pvt Ltd commentedHi,
I have modified code to allow user id as input in addition to username.
Adding patch user_id_input-92950-#7.patch
Please review.
Comment #8
andypostremoval of wrapper will break form
also removal of autocomplete is no-go, so should be added own controller
Comment #9
andypostComment #10
andypostComment #11
RumyanaRuseva CreditAttribution: RumyanaRuseva at FFW commentedComment #12
sreenivasparuchuri CreditAttribution: sreenivasparuchuri as a volunteer commentedHi I created new module where I had extended the masquarde, so that now we can able to search with role,email,user id,username
Masquerade Extra
Comment #13
sreenivasparuchuri CreditAttribution: sreenivasparuchuri as a volunteer commentedI created new module where I had extended the masquerade, so that now we can able to search with role,email,user id,username
Masquerade Extra
Comment #14
andypost@sreenivasparuchuri Thanks! I could be great foundation for #1926876: Fix and rework the masquerade_advanced sub-module
Otoh I prefer to keep module slim so better to keep all UI additions separate
Comment #15
andypostI bet current core allows to use view result as autocomplete so you just need to alter existing form
Technically is not API break but I'm sure that lots of custom modules and themes alters current keys in the form