diff --git a/inc/task.class.php b/inc/task.class.php
index 70d3e39..c501117 100644
--- a/inc/task.class.php
+++ b/inc/task.class.php
@@ -405,15 +405,11 @@ class PluginProcessmakerTask extends CommonITILTask
$used_users = [];
$used_users[] = $current_assigned_user;
if (array_key_exists($currentUser->taskId, $prevent_assign)) {
- if (is_array($prevent_assign[$currentUser->taskId])) {
- foreach ($prevent_assign[$currentUser->taskId] as $pmuser) {
- $usr_id = PluginProcessmakerUser::getGlpiIdFromAny($pmuser);
- if ($usr_id) {
- $used_users[] = $usr_id;
- }
- }
- } else {
- $usr_id = PluginProcessmakerUser::getGlpiIdFromAny($prevent_assign[$currentUser->taskId]);
+ if (!is_array($prevent_assign[$currentUser->taskId])) {
+ $prevent_assign[$currentUser->taskId] = [$prevent_assign[$currentUser->taskId]];
+ }
+ foreach ($prevent_assign[$currentUser->taskId] as $pmuser) {
+ $usr_id = PluginProcessmakerUser::getGlpiIdFromAny($pmuser);
if ($usr_id) {
$used_users[] = $usr_id;
}
diff --git a/inc/user.class.php b/inc/user.class.php
index adca5f0..dda13e0 100644
--- a/inc/user.class.php
+++ b/inc/user.class.php
@@ -303,9 +303,11 @@ class PluginProcessmakerUser extends CommonDBTM {
* @return string which is the uid of user in Processmaker database, or false if not found
*/
public static function getPMUserId($glpiUserId) {
- $obj = new self;
- if ($obj->getFromDB( Toolbox::cleanInteger($glpiUserId) )) {
- return $obj->fields['pm_users_id'];
+ if (is_numeric($glpiUserId)) {
+ $obj = new self;
+ if ($obj->getFromDB($glpiUserId)) {
+ return $obj->fields['pm_users_id'];
+ }
}
return false;
}
@@ -316,7 +318,7 @@ class PluginProcessmakerUser extends CommonDBTM {
* Returns the GLPI id of the user or false if not found
* Accept either PM GUID, GLPI logon, or GLPI ID
* @param $any
- * @return mixed GLPI ID of the user or fasle if not found
+ * @return mixed GLPI ID of the user or false if not found
*/
public static function getGlpiIdFromAny($any) {
$ret = self::getGLPIUserId($any);
diff --git a/processmaker.xml b/processmaker.xml
index f189806..6b9ceaf 100644
--- a/processmaker.xml
+++ b/processmaker.xml
@@ -29,15 +29,15 @@
9.1
- 3.4.25
+ 3.4.26
9.2
- 3.5.10
+ 3.5.11
9.3
- 3.6.16
+ 3.6.17
9.4
diff --git a/setup.php b/setup.php
index 1afeba4..5beaf89 100644
--- a/setup.php
+++ b/setup.php
@@ -1,6 +1,6 @@