When using the UserService.SavedUser event, the saved entities return inconsistent keys.
If I am editing the user properties, it returns what seems a legit key (671F56D6-5417-46C1-B6EF-17057E0F92F5).
If I am enabling or disabling a user, then it returns a totally different key (00000003-0000-0000-0000-000000000000) which seems to be related to the user Id (3).
I hooked to the SavedUser event, and added a custom method to perform operations on saved.
I need to store the key in a custom table where I store a custom entity referencing the user.
By using the method above, when I create the user, I add a row to my custom table with the user key. Later, when I edit, enable or disable the user, I perform a Get from my custom table by member key.
When I edit the user, the saved entity has the key 671F56D6-5417-46C1-B6EF-17057E0F92F5. When I enable/disable, the entity has the key 00000003-0000-0000-0000-000000000000, so it makes it impossible to get from my custom table.
I kind of understand why enabling/disabling would return different keys, but is there a way or shouldn't there be a way to know the actual key of the user it is referencing?
Inconsistent user key on SavedUser event
When using the UserService.SavedUser event, the saved entities return inconsistent keys. If I am editing the user properties, it returns what seems a legit key (671F56D6-5417-46C1-B6EF-17057E0F92F5). If I am enabling or disabling a user, then it returns a totally different key (00000003-0000-0000-0000-000000000000) which seems to be related to the user Id (3).
I hooked to the SavedUser event, and added a custom method to perform operations on saved.
I need to store the key in a custom table where I store a custom entity referencing the user.
By using the method above, when I create the user, I add a row to my custom table with the user key. Later, when I edit, enable or disable the user, I perform a Get from my custom table by member key.
When I edit the user, the saved entity has the key 671F56D6-5417-46C1-B6EF-17057E0F92F5. When I enable/disable, the entity has the key 00000003-0000-0000-0000-000000000000, so it makes it impossible to get from my custom table.
I kind of understand why enabling/disabling would return different keys, but is there a way or shouldn't there be a way to know the actual key of the user it is referencing?
Thanks.
is working on a reply...