Seiya Tashiro 7 лет назад
Родитель
Сommit
8bafb1f1dd
2 измененных файлов с 7 добавлено и 0 удалено
  1. 3 0
      src/server/models/external-account.js
  2. 4 0
      src/server/routes/login-passport.js

+ 3 - 0
src/server/models/external-account.js

@@ -98,6 +98,9 @@ class ExternalAccount {
           })
           .then(newUser => {
             return this.associate(providerType, accountId, newUser);
+          })
+          .catch(err => {
+            throw err;
           });
 
       });

+ 4 - 0
src/server/routes/login-passport.js

@@ -398,6 +398,10 @@ module.exports = function(crowi, app) {
           return;
         }
       }
+      else if (err.name === 'UserUpperLimitException') {
+        req.flash('warningMessage', 'Can not register more than the maximum number of users.');
+        return;
+      }
     }
   };