summaryrefslogtreecommitdiff
path: root/includes/controller/user_driver_licenses_controller.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-10-09 21:47:31 +0200
committermsquare <msquare@notrademark.de>2018-10-31 13:43:23 +0100
commit89e62c95a7ffd71a8e860f59378ecd13d6cbb196 (patch)
treea26965030177112a0d54a232c81ffd21d48529de /includes/controller/user_driver_licenses_controller.php
parentb069a938c6721ab5adddcbec4cff858ded6f0e1e (diff)
Changed more functions :tada:
Diffstat (limited to 'includes/controller/user_driver_licenses_controller.php')
-rw-r--r--includes/controller/user_driver_licenses_controller.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/controller/user_driver_licenses_controller.php b/includes/controller/user_driver_licenses_controller.php
index 2a3f7023..4c7c7fff 100644
--- a/includes/controller/user_driver_licenses_controller.php
+++ b/includes/controller/user_driver_licenses_controller.php
@@ -8,10 +8,10 @@
*/
function user_driver_license_required_hint()
{
- global $user;
+ $user = auth()->user();
- $angeltypes = User_angeltypes($user);
- $user_driver_license = UserDriverLicense($user['UID']);
+ $angeltypes = User_angeltypes($user->id);
+ $user_driver_license = UserDriverLicense($user->id);
// User has already entered data, no hint needed.
if (!empty($user_driver_license)) {
@@ -124,7 +124,7 @@ function user_driver_license_edit_controller()
if (UserDriverLicense_valid($user_driver_license)) {
if (empty($user_driver_license['user_id'])) {
- $user_driver_license = UserDriverLicenses_create($user_driver_license, $user_source);
+ $user_driver_license = UserDriverLicenses_create($user_driver_license, $user_source['UID']);
} else {
UserDriverLicenses_update($user_driver_license);
}