mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-26 22:43:06 -04:00
[admin] filter users also by email
This commit is contained in:
parent
bfac1149bc
commit
246d50e199
@ -89,7 +89,7 @@ router.get('/admin/users', handleErrorAsync(async (req, res) => {
|
||||
`
|
||||
|
||||
if (req.query.filter) {
|
||||
conditions.push(SQL`u.username LIKE ${'%' + req.query.filter + '%'}`);
|
||||
conditions.push(SQL`(lower(u.username) LIKE ${'%' + req.query.filter.toLowerCase() + '%'} OR lower(u.email) LIKE ${'%' + req.query.filter.toLowerCase() + '%'})`);
|
||||
}
|
||||
if (req.query.localeFilter) {
|
||||
conditions.push(SQL`p.locale=${global.config.locale}`);
|
||||
|
Loading…
x
Reference in New Issue
Block a user