Index: openacs-4/packages/acs-authentication/tcl/local-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/local-procs.tcl,v diff -u -N -r1.47.2.4 -r1.47.2.5 --- openacs-4/packages/acs-authentication/tcl/local-procs.tcl 29 Apr 2021 07:14:40 -0000 1.47.2.4 +++ openacs-4/packages/acs-authentication/tcl/local-procs.tcl 30 Apr 2021 16:06:28 -0000 1.47.2.5 @@ -639,15 +639,17 @@ Implements the Search operation of the auth_search service contract for the local account implementation. } { + set authority_id [auth::authority::local] return [db_list user_search { - select distinct user_id + select distinct username from cc_users u - where upper(coalesce(u.first_names || ' ', '') || - coalesce(u.last_name || ' ', '') || - u.email || ' ' || - u.username || ' ' || - coalesce(u.screen_name, '')) like upper('%'||:search_text||'%') - order by username, email + where authority_id = :authority_id + and upper(coalesce(u.first_names || ' ', '') || + coalesce(u.last_name || ' ', '') || + u.email || ' ' || + u.username || ' ' || + coalesce(u.screen_name, '')) like upper('%'||:search_text||'%') + order by username }] }