Created
June 5, 2020 16:48
-
-
Save Pchelolo/b2f63171eb73143a5c7b4428979747a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduce UserRecord and UserFactory | |
UserRecord is a value-object interface implemented by the old User class and a new UserRecordValue (or DatabaseUserRecord?) class. UserRecord extends UserIdentity and in addition defines the following methods: | |
hasLocalAccount | |
getRealName | |
isLocked (?!) | |
isHidden (?!) | |
getTouched/getDBTouched | |
getEmail | |
getEmailAuthenticationTimestamp | |
getRegistration | |
There should be a mutable version of UserRecord, or a builder, for use with updateUser(). | |
Factory methods: | |
loadFromSession -> createUserFromSession() : UserRecord | |
loadDefaults -> createUserFromDefaults ( $name ) : UserRecord | |
newSystemUser | |
Move loadFromSession and friends to factory. Helps with removing dependency on WebRequest/Session from User |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment