summaryrefslogtreecommitdiff
path: root/users/app/designs
diff options
context:
space:
mode:
Diffstat (limited to 'users/app/designs')
-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);
});
}