Skip to content

A free open source IT asset/license management system

Added #16239 - make city searchabke in users

snipee5c6e294ec21
diff --git a/app/Models/User.php b/app/Models/User.php
index bd03367d1a..7d903aa137 100644
--- a/app/Models/User.php
+++ b/app/Models/User.php
@@ -115,16 +115,21 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
* @var array
*/
protected $searchableAttributes = [
+ 'address',
+ 'city',
+ 'country',
+ 'email',
+ 'employee_num',
'first_name',
+ 'jobtitle',
'last_name',
- 'email',
- 'username',
+ 'locale',
'notes',
'phone',
- 'jobtitle',
- 'employee_num',
+ 'state',
+ 'username',
'website',
- 'locale',
+ 'zip',
];
/**
@@ -133,7 +138,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
* @var array
*/
protected $searchableRelations = [
- 'userloc' => ['name'],
+ 'userloc' => ['name', 'address', 'address2', 'city', 'state', 'zip'],
'department' => ['name'],
'groups' => ['name'],
'company' => ['name'],