Make parameter required

This commit is contained in:
Laurent Destailleur 2015-09-23 00:09:32 +02:00
parent 72d7671a1e
commit e62bb4da13

View File

@ -419,7 +419,7 @@ class Societe extends CommonObject
* @param User $user Object of user that ask creation * @param User $user Object of user that ask creation
* @return int >= 0 if OK, < 0 if KO * @return int >= 0 if OK, < 0 if KO
*/ */
function create($user='') function create($user)
{ {
global $langs,$conf; global $langs,$conf;
@ -484,7 +484,7 @@ class Societe extends CommonObject
$this->add_commercial($user, $this->commercial_id); $this->add_commercial($user, $this->commercial_id);
} }
// si un commercial cree un client il lui est affecte automatiquement // si un commercial cree un client il lui est affecte automatiquement
else if (!$user->rights->societe->client->voir) else if (empty($user->rights->societe->client->voir))
{ {
$this->add_commercial($user, $user->id); $this->add_commercial($user, $user->id);
} }