Needs work
Project:
Drupal core
Version:
main
Component:
user system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Feb 2020 at 06:03 UTC
Updated:
12 Dec 2024 at 17:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ghost of drupal pastBTW the user register REST endpoint should be moved into user but that's a different issue.
Comment #3
ghost of drupal pastComment #4
ghost of drupal pastPer https://www.drupal.org/node/2984247 this needs to be called ID not UUID. I have added a note to https://www.drupal.org/docs/8/core/modules/jsonapi-module/filtering#comm... as well.
Comment #5
devakintunde commentedKindly allow me to ask why this was marked as "won't fix"?
Would that mean it cannot make it into Drupal core? I want to apply your patch but now I'm sceptical because of this status.
Comment #6
pingwin4eg@devakintunde If a user is logged in, you can get their UUID with a request to /jsonapi root page, it's under
meta.links.me.meta.idproperty. For anonymous usersmetaproperty is absent.But I also think it'd be good to have it in the login or login_status response in order to avoid another request.
Comment #7
pingwin4egRerolled the patch for current stable core 9.4.5
Comment #8
shyam_bhattI have checked the "drupal-http-user-login-include-uuid-3113585-7.patch" is working fine.
After applying the patch, we can get the user UUID in the login API response.
Please check the below image.
Comment #10
shyam_bhattComment #11
catchI think this is a good change, and since it's just adding some extra data don't think we need test coverage for it, but it could use a change record to inform people it's available now.
Comment #15
theduke13 commentedI've re-rolled the changes as an issue fork and updated the usage of $user-> to $account-> as it seems Drupal Core has updated the User controller in this fashion.
Unsure how to formulate a Change Record but if someone can point me in the right direction I'll gladly put together a draft.
Cheers!