From 0dff8796ac52a4e2d0fa705559a226238bdb6c32 Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Sun, 26 May 2019 03:53:40 +0200 Subject: [PATCH] Fix missing pictures for OpenID Currently a problem appears when using OpenID for authentication as there is no method to add a profile picture right now. This patch makes sure that all undefined login methods get a profile picture. Signed-off-by: Sheogorath --- lib/models/user.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/models/user.js b/lib/models/user.js index 76e20a3..3daae45 100644 --- a/lib/models/user.js +++ b/lib/models/user.js @@ -141,6 +141,9 @@ module.exports = function (sequelize, DataTypes) { case 'saml': photo = generateAvatarURL(profile.username, profile.emails[0], bigger) break + default: + photo = generateAvatarURL(profile.username) + break } return photo },