Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 50e89e4

Browse files
committed
Fix a bug where the u13 email was saved to profile (but not sys_user)
fix a bug when no firstname lastname is provided but an alias exists
1 parent 17dd4d5 commit 50e89e4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/profiles/alias-generator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ var async = require('async');
22

33
module.exports = function(user, profile, done) {
44
var seneca = this;
5-
var lowerCaseFirstName = user.firstName.toLowerCase();
65
if (user.nick) return done(null);
6+
var lowerCaseFirstName = user.firstName.toLowerCase();
77

88
seneca.make('cd_first_name_counter').list$({
99
firstName: lowerCaseFirstName
@@ -45,4 +45,4 @@ module.exports = function(user, profile, done) {
4545
}
4646
);
4747
});
48-
};
48+
};

profiles.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ module.exports = function (options) {
175175
if (youth) {
176176
delete user.email;
177177
delete user.password;
178+
delete profile.email;
178179
}
179180

180181
seneca.act({role: 'user', cmd: 'register'}, user, function (err, data) {

0 commit comments

Comments
 (0)