Correction enregistrement commande de statuts association
This commit is contained in:
parent
0784096e2f
commit
13bf40727c
@ -881,7 +881,7 @@ class Pieces extends Scores_Ws_Server
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Commande de statut association
|
||||
* @param string $companyId
|
||||
@ -893,7 +893,7 @@ class Pieces extends Scores_Ws_Server
|
||||
{
|
||||
$this->authenticate();
|
||||
$this->permission('actes');
|
||||
|
||||
|
||||
$inseeM = new MInsee();
|
||||
if ($type == 'siren') {
|
||||
$result = $inseeM->getIdentiteLight($companyId);
|
||||
@ -902,9 +902,9 @@ class Pieces extends Scores_Ws_Server
|
||||
$result = $inseeM->getEtablissementsParId('AUTRE', $companyId);
|
||||
$companyName = $result['Nom'];
|
||||
}
|
||||
|
||||
|
||||
$refCommande = uniqid();
|
||||
|
||||
|
||||
try {
|
||||
$commandeM = new Application_Model_Sdv1OrderAssoStatut();
|
||||
$commandeM->insert(array(
|
||||
@ -914,7 +914,7 @@ class Pieces extends Scores_Ws_Server
|
||||
'companyName' => $companyName,
|
||||
'userId' => $this->User->id,
|
||||
'userLogin' => $this->User->login,
|
||||
'userEmail' => $this->USer->email,
|
||||
'userEmail' => $this->User->email,
|
||||
'dateInsert' => date('YmdHis'),
|
||||
));
|
||||
return $refCommande;
|
||||
@ -925,10 +925,10 @@ class Pieces extends Scores_Ws_Server
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Modifier une commande de statut association
|
||||
* @param string $id
|
||||
@ -942,7 +942,7 @@ class Pieces extends Scores_Ws_Server
|
||||
{
|
||||
$this->authenticate();
|
||||
$this->permission('actes');
|
||||
|
||||
|
||||
// --- Vérification que la commande existe
|
||||
try {
|
||||
$commandeM = new Application_Model_Sdv1OrderAssoStatut();
|
||||
@ -957,7 +957,7 @@ class Pieces extends Scores_Ws_Server
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// --- Paramètres envoyés
|
||||
$params = json_decode($data, true);
|
||||
$dataUpdate = array();
|
||||
@ -992,10 +992,10 @@ class Pieces extends Scores_Ws_Server
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Commande de privileges
|
||||
* @param string $companyId
|
||||
@ -1009,13 +1009,13 @@ class Pieces extends Scores_Ws_Server
|
||||
{
|
||||
$this->authenticate();
|
||||
$this->permission('privileges');
|
||||
|
||||
|
||||
$inseeM = new MInsee();
|
||||
$result = $inseeM->getIdentiteLight($companyId);
|
||||
$companyName = $result['Nom'];
|
||||
|
||||
|
||||
$refCommande = uniqid();
|
||||
|
||||
|
||||
try {
|
||||
$commandeM = new Application_Model_Sdv1OrderPrivileges();
|
||||
$commandeM->insert(array(
|
||||
@ -1036,10 +1036,10 @@ class Pieces extends Scores_Ws_Server
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Défini un email pour la commande de privilege
|
||||
* @param string $id
|
||||
@ -1050,12 +1050,12 @@ class Pieces extends Scores_Ws_Server
|
||||
public function setPrivilegesEmail($id, $email)
|
||||
{
|
||||
$this->authenticate();
|
||||
|
||||
|
||||
$validator = new Zend_Validate_EmailAddress();
|
||||
if ( !$validator->isValid($email) ){
|
||||
throw new SoapFault('ERR', "Adresse email invalide.");
|
||||
}
|
||||
|
||||
|
||||
$commandeM = new Application_Model_Sdv1OrderPrivileges();
|
||||
$sql = $commandeM->select()
|
||||
->where('login=?', $this->User->login)
|
||||
@ -1088,5 +1088,5 @@ class Pieces extends Scores_Ws_Server
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user