diff options
Diffstat (limited to 'users/app/designs/user/by_alias.js')
-rw-r--r-- | users/app/designs/user/by_alias.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/users/app/designs/user/by_alias.js b/users/app/designs/user/by_alias.js new file mode 100644 index 0000000..dc8021a --- /dev/null +++ b/users/app/designs/user/by_alias.js @@ -0,0 +1,8 @@ +function(doc) { + if (doc.type != 'User') { + return; + } + doc.email_aliases.forEach(function(alias){ + emit(alias.username, 1); + }); +} |