From 5ff84d80b4db86fbb2bdcfa1977983ac27e2410e Mon Sep 17 00:00:00 2001 From: madd15 Date: Mon, 20 Jul 2015 10:16:58 +0930 Subject: [PATCH] Change user list from email to username --- app/controllers/admin/ConsumablesController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/ConsumablesController.php b/app/controllers/admin/ConsumablesController.php index 06a815bd65..edc8faeee2 100644 --- a/app/controllers/admin/ConsumablesController.php +++ b/app/controllers/admin/ConsumablesController.php @@ -218,7 +218,7 @@ class ConsumablesController extends AdminController } // Get the dropdown of users and then pass it to the checkout view - $users_list = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat(last_name,", ",first_name," (",email,")") as full_name, id'))->whereNull('deleted_at')->orderBy('last_name', 'asc')->orderBy('first_name', 'asc')->lists('full_name', 'id'); + $users_list = array('' => 'Select a User') + DB::table('users')->select(DB::raw('concat(last_name,", ",first_name," (",username,")") as full_name, id'))->whereNull('deleted_at')->orderBy('last_name', 'asc')->orderBy('first_name', 'asc')->lists('full_name', 'id'); return View::make('backend/consumables/checkout', compact('consumable'))->with('users_list',$users_list);