process of user can be deleted again, instead of transfered to another user

This commit is contained in:
Uwe Steinmann 2020-03-27 08:16:12 +01:00
parent 297bdcb3a0
commit 97f5f73730
3 changed files with 10 additions and 4 deletions

View File

@ -4,6 +4,8 @@
- fix removal of roles (Closes: #465)
- fix password forgotten process
- fix setting role of new user and retrieving role of existing user
- processes of users can be deleted again, instead of only transfered to
another user
--------------------------------------------------------------------------------
Changes in version 6.0.8

View File

@ -205,9 +205,13 @@ else if ($action == "removefromprocesses") {
UI::exitError(getMLText("admin_tools"),getMLText("cannot_delete_yourself"));
}
$userToAssign = $dms->getUser($_POST["assignTo"]);
if (!is_object($userToAssign)) {
UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id"));
if(!empty($_POST["assignTo"])) {
$userToAssign = $dms->getUser($_POST["assignTo"]);
if (!is_object($userToAssign)) {
UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id"));
}
} else {
$userToAssign = null;
}
$userToRemove = $dms->getUser($userid);

View File

@ -52,7 +52,7 @@ class SeedDMS_View_RemoveUserFromProcesses extends SeedDMS_Bootstrap_Style {
<?php echo createHiddenFieldWithKey('removefromprocesses'); ?>
<?php
$options = array();
$options = array(array(0, getMLText('do_no_transfer_to_user'));
foreach ($allusers as $currUser) {
if ($currUser->isGuest() || ($currUser->getID() == $rmuser->getID()) )
continue;