diff options
Diffstat (limited to 'Wrapper/Functions/func_info.php')
| -rw-r--r-- | Wrapper/Functions/func_info.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Wrapper/Functions/func_info.php b/Wrapper/Functions/func_info.php index 97c12c5..b5013e2 100644 --- a/Wrapper/Functions/func_info.php +++ b/Wrapper/Functions/func_info.php @@ -2,13 +2,15 @@ // **************************************************************************** // Description: Fonction de modifications des informations de l'utilisateur par ID // **************************************************************************** -function modify_user_info($lastname, $firstname, $job, $degree, - $capabilty, $description, $phoneNumber, - $adress, $zipCode, $city, $userId) { - $dbuser = new DbUser; - $dbuser->user_infos_update($lastname, $firstname, $job, $degree, - $capabilty, $description, $phoneNumber, - $adress, $zipCode, $city, $userId); +function modify_user_info($userInfos, $userId, $isPro) { + $dbuser = new DbUser; + $dbsearch = new DbSearch; + if ($isPro) { + $userJobs = $dbsearch->get_pro_job_category($userId); + $dbuser->user_infos_update($userInfos, $userId, $isPro, $userJobs); + } else { + $dbuser->user_infos_update($userInfos, $userId, $isPro); + } // Redirection vers message avec l'index du message à afficher. $messageNumber = 2; $_SESSION["messageNumber"] = $messageNumber; |
