Skip to content
Snippets Groups Projects
Commit 215a5175 authored by Frédéric Carretero's avatar Frédéric Carretero
Browse files

Création d'une demande avec un compte public dans les widgets

Si la connexion avec le compte public n'était pas autorisée, une demande créée dans un widget avec un token public était associée à aucun utilisateur.
parent c4a0323f
No related branches found
No related tags found
No related merge requests found
...@@ -195,15 +195,8 @@ class UserOrders extends GTF { ...@@ -195,15 +195,8 @@ class UserOrders extends GTF {
$this->aValues['user_id'] = $_SESSION['ses_user_id']; $this->aValues['user_id'] = $_SESSION['ses_user_id'];
if (!empty($this->aValues['email_notifications'])) if (!empty($this->aValues['email_notifications']))
$this->aValues['email_notifications'] = str_replace(chr(13) . chr(10), ";", $this->aValues['email_notifications']); $this->aValues['email_notifications'] = str_replace(chr(13) . chr(10), ";", $this->aValues['email_notifications']);
// Si token public -> id du compte public. // Si token public -> teste si le compte 'public' a un des groupes qui est lié au traitement.
if ($this->aValues['token'] == $this->aProperties['public_token']) { if ($this->aValues['token'] == $this->aProperties['public_token']) {
$aPrivateTokenValues = $this->aValues;
$aPrivateTokenValues['user'] = $_SESSION['ses_Login'];
$aPrivateTokenValues['password'] = $this->oConnection->oBd->mdp;
$oPrivateToken = new PrivateToken($this->aPath, $aPrivateTokenValues, $this->aProperties, $this->oConnection);
$oPrivateToken->POST();
$this->aValues['user_id'] = $oPrivateToken->aFields['user_id'];
// Teste si le compte 'public' a un des groupes qui est lié au traitement.
require $this->sRessourcesFile; require $this->sRessourcesFile;
$aParams['sSchemaGtf'] = array('value' => $this->aProperties['schema_gtf'], 'type' => 'schema_name'); $aParams['sSchemaGtf'] = array('value' => $this->aProperties['schema_gtf'], 'type' => 'schema_name');
$aParams['workspace_id'] = array('value' => $this->aValues['workspace_id'], 'type' => 'number'); $aParams['workspace_id'] = array('value' => $this->aValues['workspace_id'], 'type' => 'number');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment