Skip to content

Commit

Permalink
fix(targetticket): email field as source of actors
Browse files Browse the repository at this point in the history
actors field is not allowed for anonymous forms, then allow email field to be used to populate requester, observer or assigned

Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Jan 21, 2019
1 parent a731abb commit 002778d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion inc/targetticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public function showForm($options = []) {
WHERE s.id = {$section['id']}
AND ((q.fieldtype = 'glpiselect'
AND q.values IN ('User', 'Group', 'Supplier'))
OR (q.fieldtype = 'actor'))";
OR (q.fieldtype IN ('actor', 'email')))";
$result2 = $DB->query($query2);
$section_questions_user = [];
$section_questions_group = [];
Expand All @@ -246,6 +246,8 @@ public function showForm($options = []) {
}
} else if ($question['fieldtype'] == 'actor') {
$section_questions_actors[$question['id']] = $question['name'];
} else if ($question['fieldtype'] == 'email') {
$section_questions_user[$question['id']] = $question['name'];
}
}
$questions_user_list[$section['name']] = $section_questions_user;
Expand Down

0 comments on commit 002778d

Please sign in to comment.