From 5ab86342e633886630bf61130a9e700658c320f9 Mon Sep 17 00:00:00 2001 From: Daphne Date: Thu, 15 Sep 2016 18:24:48 +0200 Subject: [PATCH] Check name existence before proceeding to issue certificate --- server/boot/certificate.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/server/boot/certificate.js b/server/boot/certificate.js index df65cd2b73..e816112417 100644 --- a/server/boot/certificate.js +++ b/server/boot/certificate.js @@ -231,6 +231,19 @@ export default function certificate(app) { .subscribe( (didCertify) => { if (didCertify) { + // Check if they have a name set + if (user.name === '') { + return res.status(200).send( + dedent` + We need your name so we can put it on your certificate. + Add your + name to your GitHub account, then go to your + settings + page and click the "update my portfolio from GitHub" + button. Then we can issue your certificate. + ` + ); + } return res.status(200).send(true); } return res.status(200).send(