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.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/controller/user_driver_licenses_controller.php b/includes/controller/user_driver_licenses_controller.php
index d1c770ba..5c629777 100644
--- a/includes/controller/user_driver_licenses_controller.php
+++ b/includes/controller/user_driver_licenses_controller.php
@@ -69,6 +69,8 @@ function user_driver_license_edit_link($user = null) {
function user_driver_license_edit_controller() {
global $privileges, $user;
+ $user_source = $user;
+
if (isset($_REQUEST['user_id'])) {
$user_source = User($_REQUEST['user_id']);
if ($user_source === false) {
@@ -82,8 +84,6 @@ function user_driver_license_edit_controller() {
if ($user['UID'] != $user_source['UID'] && ! in_array('admin_user', $privileges)) {
redirect(user_driver_license_edit_link());
}
- } else {
- $user_source = $user;
}
$wants_to_drive = false;