public function modifier_mon_profil($user_id)
{
$userinfo = $this->ion_auth_model->profil_user($this->ion_auth->get_user_id());
$this->smarty->assign("meta_titre", 'Modification de votre profil');
$this->smarty->assign("meta_description", 'Modifiez votre profil');
$this->smarty->assign("info", $userinfo );
if (!$this->ion_auth->logged_in())
{
redirect('/connexion');
}
if ($this->ion_auth->get_user_id() == $userinfo->id)
{
$this->form_validation->set_rules('email', '<b>E-mail</b>', 'required');
$this->form_validation->set_rules('sexe', '<b>Sexe</b>', 'required');
if ($this->form_validation->run() == TRUE)
{
$user_id = $this->ion_auth->get_user_id();
$sexe = $this->input->post('sexe');
$rpgmaker = $this->input->post('rpgmaker');
$biographie = $this->input->post('biographie');
$signature = $this->input->post('signature');
$siteweb = $this->input->post('siteweb');
$email = $this->input->post('email');
if ($this->Ion_auth_model->editprofil($user_id, $sexe, $rpgmaker, $biographie, $signature, $siteweb, $email))
{
echo 'Success'
}
else {
echo 'Error';
}
}