summaryrefslogtreecommitdiff
path: root/includes/controller/user_driver_licenses_controller.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/controller/user_driver_licenses_controller.php')
-rw-r--r--includes/controller/user_driver_licenses_controller.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/includes/controller/user_driver_licenses_controller.php b/includes/controller/user_driver_licenses_controller.php
index 69179b35..9dc15f15 100644
--- a/includes/controller/user_driver_licenses_controller.php
+++ b/includes/controller/user_driver_licenses_controller.php
@@ -96,13 +96,12 @@ function user_driver_license_load_user()
*/
function user_driver_license_edit_controller()
{
- global $privileges;
$user = auth()->user();
$request = request();
$user_source = user_driver_license_load_user();
// only privilege admin_user can edit other users driver license information
- if ($user->id != $user_source->id && !in_array('admin_user', $privileges)) {
+ if ($user->id != $user_source->id && !auth()->can('admin_user')) {
redirect(user_driver_license_edit_link());
}