bugfix
This commit is contained in:
parent
4844a7d7eb
commit
b59f853b7c
@ -60,18 +60,20 @@ if (!$user->rights->commercial->client->voir && $contactid && !$user->societe_id
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($user->rights->societe->contact->creer)
|
||||||
if ($_GET["action"] == 'create_user' && $user->admin)
|
|
||||||
{
|
{
|
||||||
// Recuperation contact actuel
|
if ($_GET["action"] == 'create_user' && $user->admin)
|
||||||
$contact = new Contact($db);
|
{
|
||||||
$result = $contact->fetch($_GET["id"]);
|
// Recuperation contact actuel
|
||||||
|
$contact = new Contact($db);
|
||||||
|
$result = $contact->fetch($_GET["id"]);
|
||||||
|
|
||||||
// Creation user
|
// Creation user
|
||||||
$nuser = new User($db);
|
$nuser = new User($db);
|
||||||
$nuser->nom = $contact->name;
|
$nuser->nom = $contact->name;
|
||||||
$nuser->prenom = $contact->firstname;
|
$nuser->prenom = $contact->firstname;
|
||||||
$nuser->create_from_contact($contact);
|
$nuser->create_from_contact($contact);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->societe->contact->creer)
|
if ($user->rights->societe->contact->creer)
|
||||||
@ -118,10 +120,6 @@ if ($user->rights->societe->contact->creer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
accessforbidden();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($user->rights->societe->contact->supprimer)
|
if ($user->rights->societe->contact->supprimer)
|
||||||
{
|
{
|
||||||
@ -138,10 +136,6 @@ if ($user->rights->societe->contact->supprimer)
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
accessforbidden();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($user->rights->societe->contact->creer)
|
if ($user->rights->societe->contact->creer)
|
||||||
{
|
{
|
||||||
@ -180,10 +174,6 @@ if ($user->rights->societe->contact->creer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
accessforbidden();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -248,10 +238,6 @@ if ($user->rights->societe->contact->supprimer)
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
accessforbidden();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_GET["action"] == 'create')
|
if ($_GET["action"] == 'create')
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user