@@ -59,6 +59,29 @@ public function getUser(string $uid): User {
5959 public function find (string $ search , $ limit = null , $ offset = null ): array {
6060 $ qb = $ this ->db ->getQueryBuilder ();
6161
62+ $ backtrace = debug_backtrace (DEBUG_BACKTRACE_IGNORE_ARGS );
63+ $ stack = [];
64+
65+ foreach ($ backtrace as $ index => $ trace ) {
66+ $ class = $ trace ['class ' ] ?? '' ;
67+ $ type = $ trace ['type ' ] ?? '' ;
68+ $ function = $ trace ['function ' ] ?? '' ;
69+ $ file = $ trace ['file ' ] ?? 'unknown file ' ;
70+ $ line = $ trace ['line ' ] ?? 'unknown line ' ;
71+
72+ $ stack [] = sprintf (
73+ "#%d %s%s%s() called at [%s:%s] " ,
74+ $ index ,
75+ $ class ,
76+ $ type ,
77+ $ function ,
78+ $ file ,
79+ $ line
80+ );
81+ }
82+
83+ $ this ->logger ->debug ("Find user by string: " . $ search . " -- Call Stack: \n" . implode ("\n" , $ stack ));
84+
6285 $ oidcSystemConfig = $ this ->config ->getSystemValue ('user_oidc ' , []);
6386 $ matchEmails = !isset ($ oidcSystemConfig ['user_search_match_emails ' ]) || $ oidcSystemConfig ['user_search_match_emails ' ] === true ;
6487 if ($ matchEmails ) {
@@ -91,6 +114,29 @@ public function find(string $search, $limit = null, $offset = null): array {
91114 public function findDisplayNames (string $ search , $ limit = null , $ offset = null ): array {
92115 $ qb = $ this ->db ->getQueryBuilder ();
93116
117+ $ backtrace = debug_backtrace (DEBUG_BACKTRACE_IGNORE_ARGS );
118+ $ stack = [];
119+
120+ foreach ($ backtrace as $ index => $ trace ) {
121+ $ class = $ trace ['class ' ] ?? '' ;
122+ $ type = $ trace ['type ' ] ?? '' ;
123+ $ function = $ trace ['function ' ] ?? '' ;
124+ $ file = $ trace ['file ' ] ?? 'unknown file ' ;
125+ $ line = $ trace ['line ' ] ?? 'unknown line ' ;
126+
127+ $ stack [] = sprintf (
128+ "#%d %s%s%s() called at [%s:%s] " ,
129+ $ index ,
130+ $ class ,
131+ $ type ,
132+ $ function ,
133+ $ file ,
134+ $ line
135+ );
136+ }
137+
138+ $ this ->logger ->debug ("Find user display names by string: " . $ search . " -- Call Stack: \n" . implode ("\n" , $ stack ));
139+
94140 $ oidcSystemConfig = $ this ->config ->getSystemValue ('user_oidc ' , []);
95141 $ matchEmails = !isset ($ oidcSystemConfig ['user_search_match_emails ' ]) || $ oidcSystemConfig ['user_search_match_emails ' ] === true ;
96142 if ($ matchEmails ) {
0 commit comments