diff options
author | azul <azul@riseup.net> | 2013-01-17 22:45:39 -0800 |
---|---|---|
committer | azul <azul@riseup.net> | 2013-01-17 22:45:39 -0800 |
commit | 168c36b578d675c99aad62a350aa68cc1b6d1316 (patch) | |
tree | cd1df0a9a7d3f0a9812b512cfb93db0f79b0421f /users/app/designs/user | |
parent | 19d563e2e2db98ecc5143229f554df6a09bc457e (diff) | |
parent | 27730c7e665ed64e691fdf6dbeebc39c8bfbbc4b (diff) |
Merge pull request #18 from leapcode/feature/fixed-email-address
make email address just login@domain.tld
Diffstat (limited to 'users/app/designs/user')
-rw-r--r-- | users/app/designs/user/by_alias.js (renamed from users/app/designs/user/by_email_alias.js) | 2 | ||||
-rw-r--r-- | users/app/designs/user/by_login_or_alias.js (renamed from users/app/designs/user/by_email_or_alias.js) | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/users/app/designs/user/by_email_alias.js b/users/app/designs/user/by_alias.js index 508a002..dc8021a 100644 --- a/users/app/designs/user/by_email_alias.js +++ b/users/app/designs/user/by_alias.js @@ -3,6 +3,6 @@ function(doc) { return; } doc.email_aliases.forEach(function(alias){ - emit(alias.email, 1); + emit(alias.username, 1); }); } diff --git a/users/app/designs/user/by_email_or_alias.js b/users/app/designs/user/by_login_or_alias.js index 71fd0ea..2d2096c 100644 --- a/users/app/designs/user/by_email_or_alias.js +++ b/users/app/designs/user/by_login_or_alias.js @@ -2,10 +2,8 @@ function(doc) { if (doc.type != 'User') { return; } - if (doc.email) { - emit(doc.email, 1); - } + emit(doc.login, 1); doc.email_aliases.forEach(function(alias){ - emit(alias.email, 1); + emit(alias.username, 1); }); } |