Skip to content

Commit c2e46f0

Browse files
committed
-
1 parent 1f5e9f6 commit c2e46f0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

components/server/src/user/user-service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ export class UserService {
7272
// blocked = if user already blocked OR is not allowed to pass
7373
newUser.blocked = newUser.blocked || !canPass;
7474
}
75+
if (newUser.additionalData) {
76+
// When a user is created, it does not have `additionalData.profile` set, so it's ok to rewrite it here.
77+
newUser.additionalData.profile = { acceptedPrivacyPolicyDate: new Date().toISOString() };
78+
}
7579
}
7680

7781
async findUserById(userId: string, id: string): Promise<User> {

0 commit comments

Comments
 (0)