You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2024-03-09 09:44:30

dao78
Member
Registered: 2024-03-08
Posts: 1

Anonymous ticket - Add requester

Hi everyone,
I would like to add the requester in the anonymous ticket form, depending on the email address.

The goal is to add an "email" field in the form, and during the saving process, if a user with that email exists in the glpi database, automatically populate it.

I have customized the tracking.injector.php adding these lines
         $mail = trim($_POST['mail']);
         $result = $DB->request(['SELECT' => 'M.users_id','FROM' => 'glpi_useremails as M','WHERE' => ['M.email' => ['LIKE', $mail]]]);

but I dont' know where put the userid found.

I've tried to put it in:
         $_POST['_users_id_requester']
but it doesn't work.

Is there a way to do this?
Thanks and greetings.

Offline

Board footer

Powered by FluxBB