summaryrefslogtreecommitdiff
path: root/Wrapper/Functions/func_info.php
diff options
context:
space:
mode:
authorDebulois <quentin@debulois.fr>2022-03-18 13:22:30 +0100
committerDebulois <quentin@debulois.fr>2022-03-18 13:22:30 +0100
commitf66e40340d62b5c694093bc6d10f99337382d12a (patch)
treebda05cfabbe465c3b24c0349dcbda33f21045954 /Wrapper/Functions/func_info.php
parent473e6eb56ca1211be05d2b5fd814710f2ff78d38 (diff)
Réécriture du JS & Modifications de la gestion des informations de l'utilisateur et d'autres trucs
Diffstat (limited to 'Wrapper/Functions/func_info.php')
-rw-r--r--Wrapper/Functions/func_info.php16
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;