@@ -20,7 +20,7 @@ class UserEntity
20
20
public ?String $ onboardingVersion ;
21
21
public ?string $ emailVerifiedAt ;
22
22
public ?string $ lastConnection ;
23
-
23
+
24
24
public CenterEntity $ mainCenter ;
25
25
public array $ affiliatedCenters ;
26
26
@@ -47,7 +47,7 @@ public static function fillFromDBReponseArray(array $array): UserEntity
47
47
return $ userEntity ;
48
48
}
49
49
50
- public static function fillMinimalFromDBReponseArray (array $ array ): UserEntity
50
+ public static function fillMinimalFromDBReponseArray (array $ array, bool $ withOnboarding = false ): UserEntity
51
51
{
52
52
$ userEntity = new UserEntity ();
53
53
$ userEntity ->id = $ array ['id ' ];
@@ -56,6 +56,7 @@ public static function fillMinimalFromDBReponseArray(array $array): UserEntity
56
56
$ userEntity ->centerCode = $ array ['center_code ' ];
57
57
$ userEntity ->email = $ array ['email ' ];
58
58
$ userEntity ->phone = $ array ['phone ' ];
59
+ if ($ withOnboarding ) $ userEntity ->onboardingVersion = $ array ['onboarding_version ' ];
59
60
return $ userEntity ;
60
61
}
61
62
@@ -74,12 +75,12 @@ public function addRoles(array $roles): void
74
75
$ this ->roles = $ roles ;
75
76
}
76
77
77
- public function setMainCenter (CenterEntity $ mainCenter ) : void
78
+ public function setMainCenter (CenterEntity $ mainCenter ): void
78
79
{
79
80
$ this ->mainCenter = $ mainCenter ;
80
81
}
81
82
82
- public function setAffiliatedCenters (array $ affiliatedCenters ) : void
83
+ public function setAffiliatedCenters (array $ affiliatedCenters ): void
83
84
{
84
85
$ this ->affiliatedCenters = $ affiliatedCenters ;
85
86
}
0 commit comments