Fix ghost user warning somewhere else

This commit is contained in:
Miraty 2022-05-03 19:15:02 +02:00
parent a8af13b781
commit e60f9c9292

View file

@ -46,11 +46,13 @@ if (isset($_POST['domain']) AND isset($_SESSION['username'])) {
<label for="zone">Zone</label>
<select required="" name="zone" id="zone">
<option value="" disabled="" selected="">-</option><?php
$zones = nsListUserZones($_SESSION['username']);
if (isset($_SESSION['username'])) {
$zones = nsListUserZones($_SESSION['username']);
if (!empty($zones)) {
foreach ($zones as $zone)
echo "<option value='" . $zone . "'>" . $zone . "</option>";
if (!empty($zones)) {
foreach ($zones as $zone)
echo "<option value='" . $zone . "'>" . $zone . "</option>";
}
}
?>
</select>