From aaa154aec8b446fb7123f0dd7a37bdd18490248e Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Tue, 25 May 2021 21:03:24 +0200 Subject: Simplify AdminPage::get_user Now queries the user from the concertlogs table instead of going by generating a form that is thrown away. --- includes/admin/views/giglog_admin_page.php | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'includes') diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php index 7ae7628..4f211fc 100644 --- a/includes/admin/views/giglog_admin_page.php +++ b/includes/admin/views/giglog_admin_page.php @@ -53,29 +53,20 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { fn($usr) => $usr->user_login, get_users( array( 'fields' => array( 'user_login' ) ) ) ); - // This renders a user form, which we don't really use for anything - // other than to check which user (if any) the form was made for. - // Seems this could be done a bit simpler... - $userform = GiglogAdmin_AdminPage::returnuser($ctype, $cid); + $current_user = $cid ? GiglogAdmin_Concertlogs::get_assigned_user( $cid, $ctype ) : null; $select = ''; return($select); -- cgit v1.2.3