From dbf8a767a442ef303f3f75b2286bc33872f86f18 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Tue, 7 Feb 2017 14:36:10 -0500 Subject: [PATCH] Fixed issue with social accounts with empty name --- README.md | 3 ++- models/user.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 96141aae..0ba0ccf1 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ [![Release](https://img.shields.io/github/release/Requarks/wiki.svg?maxAge=3600)](https://github.com/Requarks/wiki/releases) [![License](https://img.shields.io/badge/license-AGPLv3-blue.svg)](https://github.com/requarks/wiki/blob/master/LICENSE) +[![Github All Releases](https://img.shields.io/github/downloads/Requarks/wiki/total.svg)](https://github.com/Requarks/wiki/releases/latest) [![Build Status](https://travis-ci.org/Requarks/wiki.svg?branch=master)](https://travis-ci.org/Requarks/wiki) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/1d0217a3153c4595bdedb322263e55c8)](https://www.codacy.com/app/Requarks/wiki) [![Dependency Status](https://gemnasium.com/badges/github.com/Requarks/wiki.svg)](https://gemnasium.com/github.com/Requarks/wiki) @@ -42,7 +43,7 @@ - [x] Documentation - [x] Prerequisites - [x] Install - - [ ] Authentication + - [x] Authentication - [x] Git - [x] Upgrade - [x] Edit Entry diff --git a/models/user.js b/models/user.js index b63571ce..5c9257c8 100644 --- a/models/user.js +++ b/models/user.js @@ -65,7 +65,7 @@ userSchema.statics.processProfile = (profile) => { email: primaryEmail, provider: profile.provider, providerId: profile.id, - name: profile.displayName + name: profile.displayName || _.split(primaryEmail, '@')[0] }, { new: true, upsert: true