X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fuser.func.inc.php;h=1a07456a936ff7b9f9439d31e9c12bcffb5932a0;hb=1539dae9ff1ed56649a2fc6be17e906165351f11;hp=1cbd1f9e5c74d17974d8749cdc0acf443fb4408a;hpb=f9bebf66a51f0920e55eb6d2c60c88e2eafbc598;p=platal.git diff --git a/include/user.func.inc.php b/include/user.func.inc.php index 1cbd1f9..1a07456 100644 --- a/include/user.func.inc.php +++ b/include/user.func.inc.php @@ -428,9 +428,11 @@ function remove_user_address($uid, $adrid) { // }}} // {{{ function add_user_tel() function add_user_tel($uid, $adrid, $telid, $tel) { - XDB::execute( - "INSERT INTO tels SET uid = {?}, adrid = {?}, telid = {?}, tel = {?}, tel_type = {?}, tel_pub = {?}", - $uid, $adrid, $telid, $tel['tel'], $tel['tel_type'], $tel['tel_pub']); + $tel['tel_type'] = ($tel['tel_type'] ? $tel['tel_type'] : ''); + XDB::execute('INSERT INTO tels + SET uid = {?}, adrid = {?}, telid = {?}, tel = {?}, + tel_type = {?}, tel_pub = {?}', + $uid, $adrid, $telid, $tel['tel'], $tel['tel_type'], $tel['tel_pub']); } // }}} // {{{ function update_user_tel() @@ -570,7 +572,7 @@ function set_user_details_pro($uid, $pros) // {{{ function set_user_details() function set_user_details($uid, $details) { if (isset($details['nom_usage'])) { - XDB::execute("UPDATE auth_user_md5 SET nom_usage = {?} WHERE user_id = {?}", strtoupper($details['nom_usage']), $uid); + XDB::execute("UPDATE auth_user_md5 SET nom_usage = {?} WHERE user_id = {?}", mb_strtoupper($details['nom_usage']), $uid); } if (isset($details['mobile'])) { XDB::execute("UPDATE auth_user_quick SET profile_mobile = {?} WHERE user_id = {?}", $details['mobile'], $uid);