Skip to content

Commit f99a5bd

Browse files
committed
fix: user connection on user view
1 parent 820bb65 commit f99a5bd

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

server/helpers/microsoft.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ microsoft.createUser = async function (microsoftUser) {
5959
id: microsoftUser.sub
6060
},
6161
name: microsoftUser.name,
62-
mail: microsoftUser.email,
63-
// Default image since Microsoft needs authentication to retrieve user's image
64-
img: 'https://static.sinfo.org/static/25-sinfo/speakers/hacky.png'
62+
mail: microsoftUser.email
6563
}
6664

6765
log.debug('[Microsoft-Auth] Creating a new user', user)

server/views/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function renderObject (model, user, editionId, expand = false) {
3636
result.contacts = model.contacts
3737

3838
if (user && model.id === user.id) {
39-
if (editionId) {
39+
if (editionId && model.connections) {
4040
result.connections = model.connections[editionId]
4141
}
4242
}

0 commit comments

Comments
 (0)