From e0e64af18c00d535df0062c2191db88fc747c99b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Apr 2014 23:51:50 +0200 Subject: [PATCH] Fix: Hierarchical user not saved. --- htdocs/user/fiche.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 064cfcc9f24..85c6e815642 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -8,7 +8,7 @@ * Copyright (C) 2011 Herve Prot * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2013 Florian Henry - * Copyright (C) 2013 Alexandre Spangaro + * Copyright (C) 2013 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -185,13 +185,14 @@ if ($action == 'add' && $canadduser) $object->office_phone = GETPOST("office_phone"); $object->office_fax = GETPOST("office_fax"); $object->user_mobile = GETPOST("user_mobile"); - $object->skype = GETPOST("skype"); + $object->skype = GETPOST("skype"); $object->email = GETPOST("email"); $object->job = GETPOST("job"); $object->signature = GETPOST("signature"); $object->accountancy_code = GETPOST("accountancy_code"); $object->note = GETPOST("note"); $object->ldap_sid = GETPOST("ldap_sid"); + $object->fk_user = GETPOST("fk_user")>0?GETPOST("fk_user"):0; // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost($extralabels,$object); @@ -327,7 +328,7 @@ if ($action == 'update' && ! $_POST["cancel"]) $object->email = GETPOST("email"); $object->job = GETPOST("job"); $object->signature = GETPOST("signature"); - $object->accountancy_code = GETPOST("accountancy_code"); + $object->accountancy_code = GETPOST("accountancy_code"); $object->openid = GETPOST("openid"); $object->fk_user = GETPOST("fk_user")>0?GETPOST("fk_user"):0; @@ -864,7 +865,7 @@ if (($action == 'create') || ($action == 'adduserldap')) print ''; } print ''; - + // Skype if (! empty($conf->skype->enabled)) { @@ -1189,7 +1190,7 @@ else print ''.$langs->trans("Fax").''; print ''.dol_print_phone($object->office_fax,'',0,0,1).''; print ''."\n"; - + // Skype if (! empty($conf->skype->enabled)) { @@ -1808,7 +1809,7 @@ else } print ''; } - + // EMail print "".'global->USER_MAIL_REQUIRED)?' class="fieldrequired"':'').'>'.$langs->trans("EMail").''; print '';