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 2012-04-09 16:06:33

Oktaedr
Member
Registered: 2012-04-09
Posts: 1

How can I get ID of requester?

I want to correct function check in inc/commondbtm.class.php
Some tickets must see only user 13 and user-requester.
How can I get ID of requester? options["_users_id_requester"] is not working


function check($ID,$right,&$input=NULL) {
      global $CFG_GLPI;
     
      // Check item exists haveRight("own_ticket","1")
      if ((!$this->isNewID($ID) && !$this->getFromDB($ID)) || ((!((getLoginUserID()==13) || (getLoginUserID()==$options["_users_id_requester"]))) && ($this->fields['ticketcategories_id']==4))) {
         // Gestion timeout session
         if (!getLoginUserID()) {
            glpi_header($CFG_GLPI["root_doc"] . "/index.php");
            exit ();
         }
         displayNotFoundError();

Offline

#2 2012-04-10 15:02:26

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: How can I get ID of requester?

You only can check what you have in this function, and $options is not present


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

Board footer

Powered by FluxBB