Skip to content

Commit

Permalink
fix(target_actor): bad key for users, groups or suppliers
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <[email protected]>
  • Loading branch information
btry committed Jun 16, 2020
1 parent c66e518 commit 6e05962
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inc/target_actor.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con

case self::ACTOR_TYPE_PERSON:
$user = new User;
$users_id = plugin_formcreator_getFromDBByField($user, 'name', $input['_user']);
$users_id = plugin_formcreator_getFromDBByField($user, 'name', $input['actor_value']);
if ($users_id === false) {
throw new ImportFailureException('failed to find a user');
}
Expand All @@ -143,7 +143,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con

case self::ACTOR_TYPE_GROUP:
$group = new Group;
$groups_id = plugin_formcreator_getFromDBByField($group, 'completename', $input['_group']);
$groups_id = plugin_formcreator_getFromDBByField($group, 'completename', $input['actor_value']);
if ($groups_id === false) {
throw new ImportFailureException('failed to find a group');
}
Expand All @@ -152,7 +152,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con

case self::ACTOR_TYPE_SUPPLIER:
$supplier = new Supplier;
$suppliers_id = plugin_formcreator_getFromDBByField($supplier, 'name', $input['_supplier']);
$suppliers_id = plugin_formcreator_getFromDBByField($supplier, 'name', $input['actor_value']);
if ($suppliers_id === false) {
throw new ImportFailureException('failed to find a supplier');
}
Expand Down

0 comments on commit 6e05962

Please sign in to comment.