diff --git a/lib/object_coordination/community/community.php b/lib/object_coordination/community/community.php index 67dadf1..782f525 100755 --- a/lib/object_coordination/community/community.php +++ b/lib/object_coordination/community/community.php @@ -301,41 +301,40 @@ Class Community extends CoordinationObj */ function execAdmin() { - global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH; + global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE, $CONF_DATA_PATH; //Récupération de l'identifiant de la communauté : methode en fin de page $nodeId = recupCommunity(); - # Requete sur identifiant de l objet de coordination correspondant - $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".$nodeId; - # Exécution de Requete - $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql); + # Requete sur identifiant de l objet de coordination correspondant + $sql="SELECT * FROM ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode WHERE node_id=".$nodeId; + # Exécution de Requete + $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql); - - # Teste si il y a des enregistrements - if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0) - { - # Requete sur identifiant de l objet de coordination correspondant - $sql="UPDATE ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode SET text='".$_POST['text']."',text_resume='".$_POST['text_resume']."' WHERE node_id=".$nodeId; + # Teste si il y a des enregistrements + if ($GLOBALS['SYSTEM_DATABASE_CONN']->sql_numrows()>0) + { + # Requete sur identifiant de l objet de coordination correspondant + $sql="UPDATE ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode SET text='".$_POST['text']."',text_resume='".$_POST['text_resume']."' WHERE node_id=".$nodeId; - # Exécution de Requete - $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql); + # Exécution de Requete + $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql); } else { - # Requete sur identifiant de l objet de coordination correspondant - $sql="INSERT INTO ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode (text, text_resume, node_id) VALUES ('".$_POST['text']."','".$_POST['text_resume']."',".$nodeId.")"; + # Requete sur identifiant de l objet de coordination correspondant + $sql="INSERT INTO ".DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."textentrynode (text, text_resume, node_id) VALUES ('".$_POST['text']."','".$_POST['text_resume']."',".$nodeId.")"; - # Exécution de Requete - $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql); + # Exécution de Requete + $result=$GLOBALS['SYSTEM_DATABASE_CONN']->sql_query($sql); } - # Destruction des éléments - $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult(); + # Destruction des éléments + $GLOBALS['SYSTEM_DATABASE_CONN']->sql_freeresult(); - # Redirection vers le formulaire - systemRedirect(formatUrl($this->getId(),"Community","actionAdmin","datamodified")); - return ""; + # Redirection vers le formulaire + systemRedirect(formatUrl($this->getId(),"Community","actionAdmin","datamodified")); + return ""; } @@ -347,12 +346,12 @@ Class Community extends CoordinationObj */ function formLecture($tabPOST="") { - global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH; + global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE, $CONF_DATA_PATH; - /*Récupération des messages utilisateurs*/ + /*Récupération des messages utilisateurs*/ addMessageFile("user.ini"); addMessageFile("subscriptions.ini"); - + /* gestion du lib en fonction de la langue courante */ $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode(); $defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"]; @@ -360,20 +359,20 @@ Class Community extends CoordinationObj // titlPageInscription + ComText mxPageTitle("titlPageInscription"); - - $arrayCallCss = array(); - $arrayCallCss[] = "data/css/bootstrap-datepicker/1.9.0/bootstrap-datepicker3.min.css"; - mxCallCss($arrayCallCss); - $arrayCallJs = array(); - $arrayCallJs[] = "data/javascript/bootstrap-datepicker/1.9.0/bootstrap-datepicker.min.js"; - $arrayCallJs[] = "data/javascript/bootstrap-datepicker/1.9.0/locales/bootstrap-datepicker.fr.min.js"; - mxCallJs($arrayCallJs); - - $arrayRawJs[] = "\$(document).ready(function(){\$('.datepicker').datepicker(); });"; -// $arrayRawJs[] = "\$(document).ready(function(){\$(function(){\$(\"#fmtextinfo :input\").tooltip({position: \"top center\",offset: [0, 1],effect: \"slide\",opacity: 0.7,tip: '.tooltipRegUserForm'}),\$('.qaptcha').QapTcha({disabledSubmit: true,autoRevert : true,autoSubmit:false,PHPfile: "",txtLock: \"\",txtUnlock: \"\"});});"; - mxRawJs($arrayRawJs); - + $arrayCallCss = array(); + $arrayCallCss[] = "data/css/bootstrap-datepicker/1.9.0/bootstrap-datepicker3.min.css"; + mxCallCss($arrayCallCss); + + $arrayCallJs = array(); + $arrayCallJs[] = "data/javascript/bootstrap-datepicker/1.9.0/bootstrap-datepicker.min.js"; + $arrayCallJs[] = "data/javascript/bootstrap-datepicker/1.9.0/locales/bootstrap-datepicker.fr.min.js"; + mxCallJs($arrayCallJs); + + $arrayRawJs[] = "\$(document).ready(function(){\$('.datepicker').datepicker(); });"; +// $arrayRawJs[] = "\$(document).ready(function(){\$(function(){\$(\"#fmtextinfo :input\").tooltip({position: \"top center\",offset: [0, 1],effect: \"slide\",opacity: 0.7,tip: '.tooltipRegUserForm'}),\$('.qaptcha').QapTcha({disabledSubmit: true,autoRevert : true,autoSubmit:false,PHPfile: "",txtLock: \"\",txtUnlock: \"\"});});"; + mxRawJs($arrayRawJs); + /* On inclus la template (voir package.template.php) */ WithBlocPath("Community", "formlecture"); @@ -415,24 +414,20 @@ Class Community extends CoordinationObj $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_last_name", "text", "user_last_name", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipLastName"), ENT_QUOTES)."\"", getMessage("user_last_name")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_login", "text", "user_login", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipLogin"), ENT_QUOTES)."\"", getMessage("user_login")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mail", "email", "user_mail", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipCourriel"), ENT_QUOTES)."\"", getMessage("user_mail")); - $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password", "password", "user_password", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipPassword"), ENT_QUOTES)."\"", getMessage("user_password")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password2", "password", "user_password2", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipPassword2"), ENT_QUOTES)."\"", getMessage("user_password")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_birthdate", "text", "user_birthdate", "jj/mm/aaaa", "class=\"form\" required=\"true\" data-provide=\"datepicker\" data-date-format=\"dd/mm/yyyy\" data-date-language=\"fr\" title=\"".htmlspecialchars(getMessage("tipBirthDate"), ENT_QUOTES)."\"", getMessage("user_birthdate")); - - $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_msn", "text", "user_msn", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipUserMsn"), ENT_QUOTES)."\"", getMessage("user_msn")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_jabber", "text", "user_jabber", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipUserJabber"), ENT_QUOTES)."\"", getMessage("user_jabber")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_facebook", "text", "user_facebook", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipUserFacebook"), ENT_QUOTES)."\"", getMessage("user_facebook")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mastodon", "text", "user_mastodon", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipUserMastodon"), ENT_QUOTES)."\"", getMessage("user_mastodon")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_website", "text", "user_website", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipUserWebsite"), ENT_QUOTES)."\"", getMessage("user_website")); - $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_code", "text", "user_postal_code", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipPostalCode"), ENT_QUOTES)."\"", getMessage("user_postal_code")); - $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_adress", "text", "user_postal_adress", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipPostalAddress"), ENT_QUOTES)."\"", getMessage("user_postal_address")); - $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_addressmand", "text", "user_postal_addressmand", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipPostalAddress"), ENT_QUOTES)."\"", getMessage("user_postal_address")); - $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_city", "text", "user_city", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipCity"), ENT_QUOTES)."\"", getMessage("user_city")); - $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_state", "text", "user_state", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipState"), ENT_QUOTES)."\"", getMessage("user_state")); + $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_code", "text", "user_postal_code", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipPostalCode"), ENT_QUOTES)."\"", getMessage("user_postal_code")); + $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_adress", "text", "user_postal_adress", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipPostalAddress"), ENT_QUOTES)."\"", getMessage("user_postal_address")); + $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_addressmand", "text", "user_postal_addressmand", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipPostalAddress"), ENT_QUOTES)."\"", getMessage("user_postal_address")); + $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_city", "text", "user_city", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipCity"), ENT_QUOTES)."\"", getMessage("user_city")); + $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_state", "text", "user_state", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipState"), ENT_QUOTES)."\"", getMessage("user_state")); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_country", "text", "user_country", "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipCountry"), ENT_QUOTES)."\"", getMessage("user_country")); - $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_tel", "text", "user_tel", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipTel"), ENT_QUOTES)."\"", getMessage("user_tel")); - $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_fax", "text", "user_fax", "", "class=\"form\" required=\"false\" title=\"".htmlspecialchars(getMessage("tipFax"), ENT_QUOTES)."\"", getMessage("user_fax")); + $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_tel", "text", "user_tel", "", "class=\"form\" title=\"".htmlspecialchars(getMessage("tipTel"), ENT_QUOTES)."\"", getMessage("user_tel")); $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("charteSite", "checkbox", "charteSite", 1, "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipIAccept"), ENT_QUOTES)."\""); $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subscriptionform", "checkbox", "subscriptionform", 1, "", "class=\"form\" required=\"true\" title=\"".htmlspecialchars(getMessage("tipAcceptSubscriptionForm"), ENT_QUOTES)."\""); $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subsmladh", "checkbox", "subsmladh", 1, "", "title='".htmlspecialchars(getMessage("tipAcceptSubsMLAdh"), ENT_QUOTES)."'"); @@ -454,37 +449,34 @@ Class Community extends CoordinationObj $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_password2", "password", "user_password2", ""); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mail", "text", "user_mail", $_POST['user_mail']); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_birthdate", "text", "user_birthdate", $_POST['user_birthdate']); - $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_msn", "text", "user_msn", $_POST['user_msn']); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_jabber", "text", "user_jabber", $_POST['user_jabber']); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_facebook", "text", "user_facebook", $_POST['user_facebook']); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_mastodon", "text", "user_mastodon", $_POST['user_mastodon']); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_website", "text", "user_website", $_POST['user_website']); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_code", "text", "user_postal_code", $_POST['user_postal_code']); - - if( isset($_POST['user_postal_adress']) ) - $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_adress", "text", "user_postal_adress", $_POST['user_postal_adress']); - else - $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_adress", "text", "user_postal_adress", $_POST['user_postal_addressmand']); - - $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_adressmand", "text", "user_postal_adressmand", $_POST['user_postal_adressmand']); + $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_postal_adress", "text", "user_postal_adress", $_POST['user_postal_adress']); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_city", "text", "user_city", $_POST['user_city']); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_state", "text", "user_state", $_POST['user_state']); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_country", "text", "user_country", $_POST['user_country']); $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_tel", "text", "user_tel", $_POST['user_tel']); - $GLOBALS["SYSTEM_TEMPLATE"]->MxFormField("user_fax", "text", "user_fax", $_POST['user_fax']); - + if( isset($_POST["charteSite"]) && $_POST["charteSite"] == 1 ) $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("charteSite", "checkbox", "charteSite", 1, "checked=checked"); else $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("charteSite", "checkbox", "charteSite", 1, ""); $GLOBALS["SYSTEM_TEMPLATE"]->MxCheckerField("blocSubscriptionsForms".".subsmladh", "checkbox", "subsmladh", 1, "", "title='".htmlspecialchars(getMessage("tipAcceptSubsMLAdh"), ENT_QUOTES)."'"); - $file=new File($GLOBALS["CONF_DATA_PATH"]."data/message/".$currentCode."/charte_inscription_".$_GET['param'].".inc", "r"); - $GLOBALS["SYSTEM_TEMPLATE"]->MxText("charteSiteContent", $file->readAll()); + + if( file_exists($GLOBALS["CONF_DATA_PATH"]."data/message/".$currentCode."/charte_inscription_".$_GET['param'].".inc") ) + { + $file=new File($GLOBALS["CONF_DATA_PATH"]."data/message/".$currentCode."/charte_inscription_".$_GET['param'].".inc", "r"); + $GLOBALS["SYSTEM_TEMPLATE"]->MxText("charteSiteContent", $file->readAll()); + } + else + $GLOBALS["SYSTEM_TEMPLATE"]->MxText("charteSiteContent", htmlspecialchars(getMessage("textNoCharte"))); } ExitBloc(); - return ""; - + return ""; } public function formLectureQaptcha() @@ -525,7 +517,7 @@ Class Community extends CoordinationObj */ function execLecture() { - global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE,$CONF_DATA_PATH; + global $SERVER_NAME, $SCRIPT_NAME, $CONF_PERSISTANT_SECURE, $CONF_DATA_PATH; /* gestion du lib en fonction de la langue courante */ $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode(); @@ -542,7 +534,7 @@ Class Community extends CoordinationObj foreach($_POST as $cle=>$val) { // echo "cle = ".$cle." val =".$val."
"; - if($val=="" && ($cle !="user_comment" && $cle !="user_fax" && $cle !="user_organisation" && $cle !="user_country")) + if($val=="" && ($cle !="user_comment" && $cle !="user_fax" && $cle !="user_organisation" && $cle !="user_postal_adress" && $cle !="user_postal_code" && $cle !="user_city" && $cle !="user_state" && $cle !="user_tel" && $cle !="user_website" && $cle !="user_facebook" && $cle !="user_mastodon" && $cle !="user_jabber")) { $chaine .= getMessage($cle).", "; } @@ -553,10 +545,6 @@ Class Community extends CoordinationObj } } -/* -* Olivier case du chemin.... :-( -* 22/06/05 -*/ //Si certains champs sont manquants pour l'inscription if ($chaine != "") { @@ -571,31 +559,28 @@ Class Community extends CoordinationObj if($_POST["user_password"] != $_POST["user_password2"]) { $GLOBALS["SYSTEM_CONTROL"]->messageSystem = "password_error"; - $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/community/formlecture.mxt"); + $GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("DATA", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/community/formlecture.mxt"); $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative"); $this->formLecture($_POST); return ""; } - } -/* -* Olivier DEVAINE 13/01/05 -> plus besoin de la charte -*/ + // if(isset($_POST['user_chart'])) // { /*Inclusion de la librairie UserManagerDb pour effectuer l'insertion et la vérif dans la table sys_user_temp*/ - include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/User/ressource/usermanagerdb.php"); + include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/user/ressource/usermanagerdb.php"); //Création de l'objet $MyManager=new UserManagerDb(); //On fixe la table par la méthode getTable - $MyManager->setTable("sys_user_temp"); + $MyManager->setTable(DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."user_temp"); /*Inclusion de la librairie NodeGroupUserManagerDb pour effectuer l'insertion dans la table sys_node_group_user_temp*/ - include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/NodeGroupUser/ressource/nodegroupusermanagerdb.php"); + include_once($GLOBALS['CONF_LIB_PATH']."lib/system/system_data/nodegroupuser/ressource/nodegroupusermanagerdb.php"); //Création de l'objet $MyNodeGroupUser=new NodeGroupUserManagerDb(); //On fixe la table par la méthode getTable - $MyNodeGroupUser->setTable("sys_node_group_user_temp"); + $MyNodeGroupUser->setTable(DATA_ACCES_TABLE_PREFIX.DATA_ACCES_OBJECT_PREFIX."node_group_user_temp"); # Teste si il y a des enregistrements sur MyManager (table temporaire) ou sur la table des comptes if (($MyManager->checkValid($_POST["user_login"], $_POST["user_password"]) != 0) || ($GLOBALS['SYSTEM_MANAGER']['USER']->checkValid($_POST["user_login"], $_POST["user_password"]) != 0)) @@ -605,27 +590,38 @@ Class Community extends CoordinationObj $GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("DATA", "relative"); $this->formLecture($_POST); // systemRedirect(formatUrl($this->getId(),"Community","formLecture","user_exist")); - } + } else - { + { + /* Vérification du statut du compte */ + $user_account_active=(isset($_POST["user_account_active"]))?$_POST["user_account_active"]:"off"; + //On créé un nouvel objet User pour effectuer l'insertion de chaque champs $MyUser=new User(); + $MyUser->setAccountActive($user_account_active); $MyUser->setTitle($_POST['user_title']); $MyUser->setFirstName($_POST['user_first_name']); $MyUser->setLastName($_POST['user_last_name']); $MyUser->setLogin($_POST['user_login']); $MyUser->setPassword($_POST['user_password']); $MyUser->setMail($_POST['user_mail']); - $MyUser->setPostalAddress($_POST['user_postal_address']); + $d = DateTime::createFromFormat('d/m/Y', $_POST['user_birthdate']); + $MyUser->setBirthDate($d->getTimestamp()); + $MyUser->setPostalAddress($_POST['user_postal_adress']); $MyUser->setPostalCode($_POST['user_postal_code']); $MyUser->setCity($_POST['user_city']); $MyUser->setState($_POST['user_state']); $MyUser->setCountry($_POST['user_country']); - $MyUser->setOrganisation($_POST['user_organisation']); +// $MyUser->setOrganisation($_POST['user_organisation']); $MyUser->setTel($_POST['user_tel']); - $MyUser->setFax($_POST['user_fax']); - $MyUser->setComment($_POST['user_comment']); + $MyUser->setMastodon($_POST['user_mastodon']); + $MyUser->setFacebook($_POST['user_facebook']); + $MyUser->setJabber($_POST['user_jabber']); + $MyUser->setTel($_POST['user_tel']); + $MyUser->setWebsite($_POST['user_website']); +// $MyUser->setComment(array($_POST['user_comment'])); + //On enregistre les paramètres $ObjUsersave = $MyManager->saveInstance($MyUser); @@ -633,31 +629,21 @@ Class Community extends CoordinationObj //Champs concernés : user_id, group_id, node_id, is_node_only, is_forbidden $MyNodeUser =new NodeGroupUser(); $MyNodeUser->setUserId($ObjUsersave->getId()); + if(isset($_GET['param'])) - { $MyNodeUser->setNodeId($_GET['param']); - } + $MyNodeUser->setGroupId(0); - $MyNodeUser->setIsForbidden(0); - $MyNodeUser->setIsNodeOnly(0); +// $MyNodeUser->setIsForbidden(0); +// $MyNodeUser->setIsNodeOnly(0); //on enregistre les paramètres $test = $MyNodeGroupUser->saveInstance($MyNodeUser); - /*Indexation dans le moteur de recherche*/ - if (includePackage("search.php")){ - $status=1; - Search::addSearch("¶m=".$ObjUsersave->getId(), "usertemp", array("actionManageRegister"=>"actionManageRegister"), $MyUser->getFirstName()." ".$MyUser->getLastName(), $MyUser->getMail()." ".$MyUser->getTel(), "", $status, 0, 0, 0, $_GET['param']); - /*On récupère l'oid de l'objet dans les droits selon le nid de la communauté*/ - /*$oidObj = Search::getOidFromNameAndNode("usertemp", $_GET['param']); - if($oidObj != 0) - { - Search::addSearch("¶m=".$ObjUsersave->getId(), "usertemp", array("actionManageRegister"=>"actionManageRegister"), $MyUser->getFirstName()." ".$MyUser->getLastName(), $MyUser->getMail()." ".$MyUser->getTel(), "", $status, $oidObj); - }*/ - } - # Redirection vers le formulaire - systemRedirect(absoluteUrl("user_subscribe",$_GET['param'])); +// systemRedirect(absoluteUrl("user_subscribe", $_GET['param'])); + # Redirection vers le formulaire + systemRedirect(formatUrl($this->getId(),"Home", "actionLecture", "user_subscribe")); } // } // else //si la Charte n'est pas validée