gitea/models/user
Philip Peterson b0936f4f41
Do not mutate incoming options to RenderUserSearch and SearchUsers (#34544)
This PR changes the `opts` argument in `SearchUsers()` to be passed by
value instead of by pointer, as its mutations do not escape the function
scope and are not used elsewhere. This simplifies reasoning about the
function and avoids unnecessary pointer usage.

This insight emerged during an initial attempt to refactor
`RenderUserSearch()`, which currently intermixes multiple concerns.

Co-authored-by: Philip Peterson <philip-peterson@users.noreply.github.com>
2025-05-27 19:36:02 +00:00
..
avatar.go Return default avatar url when user id is zero rather than updating database (#34094) 2025-04-02 01:03:27 +00:00
avatar_test.go Use test context in tests and new loop system in benchmarks (#33648) 2025-02-20 09:57:40 +00:00
badge.go
block.go
email_address.go Support choose email when creating a commit via web UI (#33432) 2025-01-30 01:24:57 +00:00
email_address_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
error.go
external_login_user.go allow synchronizing user status from OAuth2 login providers (#31572) 2024-07-16 20:33:16 +02:00
follow.go
follow_test.go
list.go
main_test.go
must_change_password.go Refactor error system (#33771) 2025-03-03 05:36:10 +00:00
openid.go Refactor user package (#33423) 2025-01-29 01:14:35 +02:00
openid_test.go Refactor older tests to use testify (#33140) 2025-01-09 09:21:47 +08:00
redirect.go
redirect_test.go
search.go Do not mutate incoming options to RenderUserSearch and SearchUsers (#34544) 2025-05-27 19:36:02 +00:00
setting.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
setting_keys.go Add file tree to file view page (#32721) 2025-03-15 16:26:49 +08:00
setting_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
user.go Fix GetUsersByEmails (#34423) 2025-05-10 11:47:58 -07:00
user_list.go Small refactor to reduce unnecessary database queries and remove duplicated functions (#33779) 2025-03-04 18:25:20 +00:00
user_system.go Fix some migration and repo name problems (#33986) 2025-03-24 20:26:58 -07:00
user_system_test.go Refactor user & avatar (#33433) 2025-01-30 07:33:50 +08:00
user_test.go Do not mutate incoming options to RenderUserSearch and SearchUsers (#34544) 2025-05-27 19:36:02 +00:00
user_update.go