<?php
/***************************************************************************
- * Copyright (C) 2003-2009 Polytechnique.org *
+ * Copyright (C) 2003-2010 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
'user_id' => array('requests', 'user_changes'));
if ($really_del) {
- array_push($tables_to_clear['uid'], 'emails', 'groupex.membres', 'contacts', 'adresses', 'tels',
- 'photo', 'perte_pass', 'langues_ins', 'forums.abos', 'forums.profils');
+ array_push($tables_to_clear['uid'], 'emails', '#groupex#.membres', 'contacts', 'adresses', 'tels',
+ 'photo', 'perte_pass', 'langues_ins', '#forums#.abos', '#forums#.profils');
array_push($tables_to_clear['user_id'], 'newsletter_ins', 'auth_user_quick', 'binets_ins');
$tables_to_clear['id'] = array('aliases');
$tables_to_clear['contact'] = array('contacts');
$user['binets_join'] = join(', ', $user['binets']);
$res = XDB::iterRow("SELECT a.diminutif, a.nom, a.site
- FROM groupex.asso AS a
- LEFT JOIN groupex.membres AS m ON (m.asso_id = a.id)
+ FROM #groupex#.asso AS a
+ LEFT JOIN #groupex#.membres AS m ON (m.asso_id = a.id)
WHERE m.uid = {?} AND (a.cat = 'GroupesX' OR a.cat = 'Institutions')
AND pub = 'public'", $uid);
$user['gpxs'] = Array();
// }}}
// {{{ 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()
// {{{ 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);