diff --git a/src/DDSERVICES/SOAP/DDserverWeb.php b/src/DDSERVICES/SOAP/DDserverWeb.php
index bf6fbda..a6280db 100644
--- a/src/DDSERVICES/SOAP/DDserverWeb.php
+++ b/src/DDSERVICES/SOAP/DDserverWeb.php
@@ -169,7 +169,7 @@
return array(
"valid" => FALSE,
);
- }
+ }
$data_array = json_decode($data_decoded, TRUE);
if (empty($data_array) || empty($data_array["timestamp"])) {
@@ -276,7 +276,32 @@
$last_name = !array_key_exists('last_name', $data_array) ? "" : $data_array['last_name'];
$email = !array_key_exists('email', $data_array) ? "" : $data_array['email'];
return ($userManager->AddUser($data_array['login'], $pwd_hash, $first_name, $last_name, $email, 1, '') == 1);
- }
+ }
+
+ function resetUserPwd($data, $key, $check)
+ {
+ $data_array = $this->checkProtectedAPI($data, $key, $check);
+ if ($data_array['valid'] == FALSE) {
+ return FALSE;
+ }
+
+ if (empty($data_array['login']) || empty($data_array['crtpwd']) || empty($data_array['newpwd'])) {
+ return FALSE;
+ }
+
+ require_once userMgrDir."/UserManagerClass.php";
+ putenv("PATH=./:".DDBASEBIN.":/bin:/usr/bin");
+ putenv("DDINFO=".extBaseDir);
+ putenv("DDBASE=".baseDir);
+ putenv("AMDA_USERS_INFO=AMDA_Users_Info.xml");
+ putenv("AMDA_GROUPS_INFO=AMDA_Users.xml");
+ $stderr = fopen("php://stderr","w");
+ $userManager = new UserManagerClass($stderr);
+ $crtpwd_hash = $userManager->cryptPwd($data_array['login'], $data_array['crtpwd']);
+ $newpwd_hash = crypt($data_array['newpwd'],chr(rand(97,122)).chr(rand(97,122)));
+ return ($userManager->ModifyUserPwd($data_array['login'], $crtpwd_hash, $newpwd_hash) == 1);
+
+ }
/*
* Return a list of group for which a user is a member
diff --git a/src/DDSERVICES/SOAP/dd.wsdl.in b/src/DDSERVICES/SOAP/dd.wsdl.in
index 483a5c1..76608ae 100644
--- a/src/DDSERVICES/SOAP/dd.wsdl.in
+++ b/src/DDSERVICES/SOAP/dd.wsdl.in
@@ -163,6 +163,14 @@
+
+
+
+
+
+
+
+
@@ -247,7 +255,11 @@
-
+
+
+
+
+
@@ -459,6 +471,17 @@
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
+
+
+
+
+
+
+
--
libgit2 0.21.2