Skip to content

Lowercase persisted emails for easier matching

Eric Eastwood requested to merge lowercase-persisted-emails into develop

Lowercase persisted emails for easier matching

Spawned out of a ticket where I searched for an email and couldn't find the user because our Mongo query lowercases but it is persisted with mixed case.

$ ssh webapp-01.prod.gitter
$ cd /opt/gitter/gitter-webapp/ && eval $(/opt/gitter/secrets/webapp/env prod) && eval $(/usr/bin/ns-env)
$ NODE_ENV=prod ./scripts/utils/find-users-by-email.js --email testMan@example.com

We could update the user find by email function but it's probably best to fix the data source. Ref https://stackoverflow.com/a/1863452/796832

Edited by Eric Eastwood

Merge request reports