Skip to content

Commit 200b961

Browse files
committed
Merge branch 'develop' into multitenancy
2 parents 98d85c1 + dfd7de7 commit 200b961

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/backend/src/services/users.services.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,16 @@ export default class UsersService {
234234
const firstName = payload['given_name'] ?? payload['email']!.split('@')[0]; // Defaults to id of email
235235
const lastName = payload['family_name'] ?? ''; // Defaults to no last name
236236

237+
const nonHuskyEmail = payload['email']!.includes('@husky.neu.edu')
238+
? payload['email'].replace(/@husky\.neu\.edu/i, '@northeastern.edu')
239+
: payload['email'];
240+
237241
const createdUser = await prisma.user.create({
238242
data: {
239243
firstName,
240244
lastName,
241245
googleAuthId: userId,
242-
email: payload['email'],
246+
email: nonHuskyEmail,
243247
emailId,
244248
userSettings: { create: {} }
245249
},

0 commit comments

Comments
 (0)