Closed bidi47 closed 3 years ago
Important: update User if will update the email in user_detail table , should it update the identity in user table ?
TABLE user.identity
TABLE user_detail email Nullabel, used for recover password
user.identity == user_detail.email ? NO
DEFAULT user.identity != user_detail.email
EXAMPLE : mario@dotkernel.com identity NEVER CHANGE ( only manually in DB )
** UPDATE User _details email updates ONLY user_detail.email
RESET PASSWORD ? user_detail.email FORM 1. recover identity EMAIL => identity sent by mail IF EXISTS FORM 2. reset passwodr: IDENTITY => password reset link sent by email
CREATE ACCOUNT : email, password , first , lastname
INSERT user.identity && user.password INSERT user_detail firts, last, email
Must be implemented in frontend too
the User entity has no email property or getters/setters for it but UserService still uses getEmail and setEmail
we need to discuss again how to handle identity the user should have an email to be contacted, but identity can be a non-email string which would break e.g. the welcome email