mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
check for pwdexpiration
set mandatory workflow
This commit is contained in:
parent
9398210dc2
commit
26c0859ac1
|
@ -82,6 +82,12 @@ if ($action == "adduser") {
|
|||
}
|
||||
else UI::exitError(getMLText("admin_tools"),getMLText("access_denied"));
|
||||
|
||||
if(isset($_POST["workflow"])) {
|
||||
$workflow = $dms->getWorkflow($_POST["workflow"]);
|
||||
if($workflow)
|
||||
$newUser->setWorkflow($workflow);
|
||||
}
|
||||
|
||||
if (isset($_POST["usrReviewers"])){
|
||||
foreach ($_POST["usrReviewers"] as $revID)
|
||||
$newUser->setMandatoryReviewer($revID,false);
|
||||
|
@ -166,7 +172,10 @@ else if ($action == "edituser") {
|
|||
|
||||
$login = $_POST["login"];
|
||||
$pwd = $_POST["pwd"];
|
||||
if(isset($_POST["pwdexpiration"]))
|
||||
$pwdexpiration = $_POST["pwdexpiration"];
|
||||
else
|
||||
$pwdexpiration = '';
|
||||
$name = $_POST["name"];
|
||||
$email = $_POST["email"];
|
||||
$comment = $_POST["comment"];
|
||||
|
@ -208,6 +217,16 @@ else if ($action == "edituser") {
|
|||
if(!$isDisabled)
|
||||
$editedUser->clearLoginFailures();
|
||||
}
|
||||
if(isset($_POST["workflow"]) && $_POST["workflow"]) {
|
||||
$currworkflow = $editedUser->getMandatoryWorkflow();
|
||||
if (!$currworkflow || ($currworkflow->getID() != $_POST["workflow"])) {
|
||||
$workflow = $dms->getWorkflow($_POST["workflow"]);
|
||||
if($workflow)
|
||||
$editedUser->setMandatoryWorkflow($workflow);
|
||||
}
|
||||
} else {
|
||||
$editedUser->delMandatoryWorkflow();
|
||||
}
|
||||
|
||||
if (isset($_FILES['userfile']) && is_uploaded_file($_FILES["userfile"]["tmp_name"]) && $_FILES["userfile"]["size"] > 0 && $_FILES['userfile']['error']==0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user