extend check of photo

master
Mészáros Mihály 2019-05-14 08:07:30 +02:00
parent b209b35113
commit 393ec15221
1 changed files with 5 additions and 1 deletions

View File

@ -173,7 +173,11 @@ function setupAuth(oidcIssuer)
if (typeof(req.user) !== 'undefined'){ if (typeof(req.user) !== 'undefined'){
if (typeof(req.user.displayName) !== 'undefined') displayName=req.user.displayName; if (typeof(req.user.displayName) !== 'undefined') displayName=req.user.displayName;
else displayName=""; else displayName="";
if (typeof(req.user.Photos[0].value) !== 'undefined') photo=req.user.Photos[0].value if (
typeof(req.user.Photos) !== 'undefined' &&
typeof(req.user.Photos[0]) !== 'undefined' &&
typeof(req.user.Photos[0].value) !== 'undefined'
) photo=req.user.Photos[0].value;
else photo="/static/media/buddy.403cb9f6.svg"; else photo="/static/media/buddy.403cb9f6.svg";
} }