Просмотр исходного кода

Fix #2507 and #2504 (#2513)

* Fix issue in edit user template

* Un suspend user before deleting user

* Format and add comment

Co-authored-by: Raphael <rs@scit.ch>
Jaap Marcus 3 лет назад
Родитель
Сommit
e7860dddcc
2 измененных файлов с 4 добавлено и 1 удалено
  1. 3 0
      bin/v-delete-user
  2. 1 1
      web/templates/pages/edit_user.html

+ 3 - 0
bin/v-delete-user

@@ -75,6 +75,9 @@ if [ -n "$DB_SYSTEM" ] && [ "$DB_SYSTEM" != 'no' ]; then
     check_result "$?" "database deletion failed"
 fi
 
+# Unsuspend user just in case
+$BIN/v-unsuspend-user "$user"
+
 # Releasing user ips
 $BIN/v-delete-user-ips "$user"
 check_result "$?" "user ip release failed"

+ 1 - 1
web/templates/pages/edit_user.html

@@ -151,7 +151,7 @@
 									</tr>
 									<tr>
 										<td id="password-options-ip" style="<?php if ($v_login_disabled === 'yes') { echo 'display: none;'; } else { echo 'display: table-cell;'; }?>">
-											<label><input type="checkbox" size="20" class="vst-checkbox" onclick="javascript:elementHideShow('ip-allowlist')" name="v_login_use_iplist" <?php if ($data[$user]['LOGIN_USE_IPLIST'] === "yes") echo "checked=yes" ?>><?=_('Use IP address allow list for login attempts');?></label>
+											<label><input type="checkbox" size="20" class="vst-checkbox" onclick="javascript:elementHideShow('ip-allowlist')" name="v_login_use_iplist" <?php if ($v_login_use_iplist === "yes") echo "checked=yes" ?>><?=_('Use IP address allow list for login attempts');?></label>
 										</td>
 									</tr>
 									<tr>