Fix spaces not being stripped in admin account search (#21324)
Fixes #21058 Regression from #18641pull/41/head
parent
c0dcf15d1e
commit
57b893d505
|
@ -43,13 +43,13 @@ class AccountFilter
|
||||||
when 'status'
|
when 'status'
|
||||||
status_scope(value)
|
status_scope(value)
|
||||||
when 'by_domain'
|
when 'by_domain'
|
||||||
Account.where(domain: value.to_s)
|
Account.where(domain: value.to_s.strip)
|
||||||
when 'username'
|
when 'username'
|
||||||
Account.matches_username(value.to_s)
|
Account.matches_username(value.to_s.strip)
|
||||||
when 'display_name'
|
when 'display_name'
|
||||||
Account.matches_display_name(value.to_s)
|
Account.matches_display_name(value.to_s.strip)
|
||||||
when 'email'
|
when 'email'
|
||||||
accounts_with_users.merge(User.matches_email(value.to_s))
|
accounts_with_users.merge(User.matches_email(value.to_s.strip))
|
||||||
when 'ip'
|
when 'ip'
|
||||||
valid_ip?(value) ? accounts_with_users.merge(User.matches_ip(value).group('users.id, accounts.id')) : Account.none
|
valid_ip?(value) ? accounts_with_users.merge(User.matches_ip(value).group('users.id, accounts.id')) : Account.none
|
||||||
when 'invited_by'
|
when 'invited_by'
|
||||||
|
|
Loading…
Reference in New Issue