X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fuser.func.inc.php;h=c37be8f877d1f77a02b4c0c13b970cf743156dbb;hb=95c97c1e96e999a8e6792854bed8f1b6660cb3b4;hp=1cbd1f9e5c74d17974d8749cdc0acf443fb4408a;hpb=8230e9f8eff954fb1103c8bdcf0d22557d419ae7;p=platal.git diff --git a/include/user.func.inc.php b/include/user.func.inc.php index 1cbd1f9..c37be8f 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()