From 9fa6bfd1a597835cfb1f2dcd9350bbd47e6bd0b0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 29 Nov 2017 15:30:41 +0100 Subject: [PATCH] Fix edit external user or not --- htdocs/core/lib/functions.lib.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b58d24ba028..4c6730500af 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -238,6 +238,17 @@ function dol_shutdown() } +/** + * Return true if we are in a context of submitting a parameter + * + * @param string $paramname Name or parameter to test + * @return boolean True if we have just submit a POST or GET request with the parameter provided (even if param is empty) + */ +function GETPOSTISSET($paramname) +{ + return (isset($_POST[$paramname]) || isset($_GET[$paramname])); +} + /** * Return value of a param into GET or POST supervariable. * Use the property $user->default_values[path]['creatform'] and/or $user->default_values[path]['filters'] and/or $user->default_values[path]['sortorder']