Skip to Content
Former Member
Nov 22, 2016 at 10:27 PM

Can Principal.uid change?



I want to implement a registration mechanism, where my new users must enter their e-mail address and a password. Principal.uid will hold the username (i.e e-mail address) by default.

Now, the user may change her e-mail address later on, and we must adapt and accept her new e-mail address during subsequent login attempts. In other words, we must override the value stored in Principal.uid as that is the field user for letter the user log in. Is it safe to do so? Are there many objects that refer to this attribute? Afaik, it's the value of UID that's used during login, we my application is kinda sensitive to any changes in UID.

Can you confirm that it's a viable approach to handle e-mail changes? What references to UID should i be aware of and handle properly?