Add ADHERENT_DEFAULT_CREATE_THIRDPARTY

This commit is contained in:
daraelmin 2021-03-27 17:29:06 +01:00
parent 5b64a517ea
commit e0551f1e32

View File

@ -207,7 +207,7 @@ if (empty($reshook)) {
}
// Create third party from a member
if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights->societe->creer) {
if (($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights->societe->creer) || (!empty($conf->global->ADHERENT_DEFAULT_CREATE_THIRDPARTY))) {
if ($result > 0) {
// User creation
$company = new Societe($db);