Skip to content

Commit 7be901f

Browse files
committed
Merge pull request #314 from apinf/feature/email-mandatory
Feature/email mandatory
2 parents 23846d1 + 2206ea3 commit 7be901f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

both/collections/users.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Schemas.User = new SimpleSchema({
3131
},
3232
emails: {
3333
type: [Object],
34-
optional: true
34+
optional: false
3535
},
3636
"emails.$.address": {
3737
type: String,

server/accounts.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Accounts.onCreateUser(function(options, user) {
99
verified: false
1010
}
1111
];
12+
// rewriting original error message if github email isn't public
13+
throw new Meteor.Error(500, 'Please, make your github email public in order to login.');
1214
} else {
1315
user.emails = [
1416
{

0 commit comments

Comments
 (0)