Quellcode durchsuchen

Search by name, userName or email address when adding a new user to a board

Emile NDAGIJIMANA vor 3 Jahren
Ursprung
Commit
1852e66abd
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      models/users.js

+ 1 - 1
models/users.js

@@ -431,7 +431,7 @@ Users.allow({
 
 
 // Search a user in the complete server database by its name or username. This
 // Search a user in the complete server database by its name or username. This
 // is used for instance to add a new user to a board.
 // is used for instance to add a new user to a board.
-const searchInFields = ['username', 'profile.fullname'];
+const searchInFields = ['username', 'profile.fullname', 'emails.address'];
 Users.initEasySearch(searchInFields, {
 Users.initEasySearch(searchInFields, {
   use: 'mongo-db',
   use: 'mongo-db',
   returnFields: [...searchInFields, 'profile.avatarUrl'],
   returnFields: [...searchInFields, 'profile.avatarUrl'],