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.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/includes/controller/user_driver_licenses_controller.php b/includes/controller/user_driver_licenses_controller.php
index 49f21d14..a76d5507 100644
--- a/includes/controller/user_driver_licenses_controller.php
+++ b/includes/controller/user_driver_licenses_controller.php
@@ -9,18 +9,17 @@ function user_driver_license_required_hint() {
$angeltypes = User_angeltypes($user);
$user_driver_license = UserDriverLicense($user['UID']);
- $driving_license_information_required = false;
+ // User has already entered data, no hint needed.
+ if ($user_driver_license != null) {
+ return '';
+ }
+
foreach ($angeltypes as $angeltype) {
if ($angeltype['requires_driver_license']) {
- $driving_license_information_required = true;
- break;
+ return info(sprintf(_("You joined an angeltype which requires a driving license. Please edit your driving license information here: %s."), '<a href="' . user_driver_license_edit_link() . '">' . _("driving license information") . '</a>'), true);
}
}
- if ($driving_license_information_required && $user_driver_license == null) {
- return info(sprintf(_("You joined an angeltype which requires a driving license. Please edit your driving license information here: %s."), '<a href="' . user_driver_license_edit_link() . '">' . _("driving license information") . '</a>'), true);
- }
-
return '';
}