}
global $globals;
- $res = XDB::query("SELECT u.hruid, d.promo_display AS promo,
+ $res = XDB::query("SELECT u.hruid, d.promo,
CONCAT(af.alias, '@{$globals->mail->domain}') AS forlife,
CONCAT(ab.alias, '@{$globals->mail->domain}') AS bestalias,
CONCAT(u.prenom, ' ', IF(u.nom_usage <> '', u.nom_usage, u.nom)) AS full_name,
q.core_mail_fmt AS email_format,
u.perms
FROM auth_user_md5 AS u
- INNER JOIN profile_display AS d ON (d.uid = u.user_id)
+ INNER JOIN profile_display AS d ON (d.pid = u.user_id)
LEFT JOIN auth_user_quick AS q ON (q.user_id = u.user_id)
LEFT JOIN aliases AS af ON (af.id = u.user_id AND af.type = 'a_vie')
LEFT JOIN aliases AS ab ON (ab.id = u.user_id AND FIND_IN_SET('bestalias', ab.flags))
function &get_user_details($login, $from_uid = '', $view = 'private')
{
- $reqsql = "SELECT u.user_id, d.promo_display, u.prenom, u.nom, u.nom_usage, u.date, u.cv,
+ $reqsql = "SELECT u.user_id, d.promo, u.prenom, u.nom, u.nom_usage, u.date, u.cv,
u.perms IN ('admin','user','disabled') AS inscrit, FIND_IN_SET('femme', u.flags) AS sexe, u.deces != 0 AS dcd, u.deces,
q.profile_nick AS nickname, q.profile_from_ax, q.profile_freetext AS freetext,
q.profile_freetext_pub AS freetext_pub,
LEFT JOIN profile_mentor AS m ON (m.uid = u.user_id)
LEFT JOIN emails AS e ON (e.uid = u.user_id AND e.flags='active')
INNER JOIN profile_names_display AS nd ON (nd.user_id = u.user_id)
- INNER JOIN profile_display AS d ON (d.uid = u.user_id)
+ INNER JOIN profile_display AS d ON (d.pid = u.user_id)
WHERE a.alias = {?}
GROUP BY u.user_id";
$res = XDB::query($reqsql, $from_uid, $login);
public function fields()
{
global $globals;
- return "u.user_id AS id, u.*, d.promo_display,
+ return "u.user_id AS id, u.*, d.promo,
CONCAT(a.alias, '@{$globals->mail->domain}') AS bestemail,
u.perms != 'pending' AS inscrit,
u.perms != 'pending' AS wasinscrit,
LEFT JOIN geoloc_region AS gr ON (adr.country = gr.a2 AND adr.region = gr.region)
LEFT JOIN emails AS em ON (em.uid = u.user_id AND em.flags = 'active')
INNER JOIN profile_names_display AS nd ON (nd.user_id = u.user_id)
- INNER JOIN profile_display AS d ON (d.uid = u.user_id)" . (S::logged() ?
+ INNER JOIN profile_display AS d ON (d.pid = u.user_id)" . (S::logged() ?
"LEFT JOIN contacts AS c ON (c.contact = u.user_id AND c.uid = " . S::v('uid') . ")"
: "");
}
public function fields()
{
- return "m.uid, d.promo_display, u.hruid,
+ return "m.uid, d.promo, u.hruid,
m.expertise, mp.country, ms.sectorid, ms.subsectorid,
nd.display AS name_display, nd.tooltip AS name_tooltip, nd.sort AS name_sort";
}
public function joins()
{
return "INNER JOIN profile_names_display AS nd ON (nd.user_id = u.user_id)
- INNER JOIN profile_display AS d ON (d.uid = u.user_id)";
+ INNER JOIN profile_display AS d ON (d.pid = u.user_id)";
}
public function bounds()
public function fields()
{
- return "u.user_id, nd.display AS name_display, nd.tooltip AS name_tooltip, nd.sort AS name_sort, u.promo, d.promo_display, u.hruid ";
+ return "u.user_id, nd.display AS name_display, nd.tooltip AS name_tooltip, nd.sort AS name_sort, u.promo, d.promo, u.hruid ";
}
public function joins()
{
return "INNER JOIN photo AS p ON (p.uid = u.user_id)
- INNER JOIN profile_display AS d ON (d.uid = u.user_id)
+ INNER JOIN profile_display AS d ON (d.pid = u.user_id)
INNER JOIN profile_names_display AS nd ON (nd.user_id = u.user_id)";
}
header('Content-Type: text/xml');
header('Pragma:');
$only_current = Env::v('only_current', false)? ' AND FIND_IN_SET(\'active\', adrf.statut)' : '';
- $it =& $this->set->get('u.user_id AS id, u.prenom, u.nom, d.promo_display, al.alias',
+ $it =& $this->set->get('u.user_id AS id, u.prenom, u.nom, d.promo, al.alias',
"INNER JOIN adresses AS adrf ON (adrf.uid = u.user_id $only_current)
- INNER JOIN profile_display AS d ON (d.uid = u.user_id)
+ INNER JOIN profile_display AS d ON (d.pid = u.user_id)
LEFT JOIN aliases AS al ON (u.user_id = al.id
AND FIND_IN_SET('bestalias', al.flags))
INNER JOIN adresses AS avg ON (" . getadr_join('avg') . ")",
$this->stamp = date('YmdHis');
$this->unique = $_unique;
$this->type = $_type;
- $res = XDB::query("SELECT promo_display AS promo
+ $res = XDB::query("SELECT promo
FROM profile_display
- WHERE uid={?}", $this->user->id());
+ WHERE pid={?}", $this->user->id());
$this->promo = $res->fetchOneCell();
}
// Fetch the events to display, along with their metadata.
$array = array();
- $it = XDB::iterator("SELECT e.id, e.titre, e.texte, e.post_id, a.user_id, a.nom, a.prenom, d.promo_display ,a.hruid,
+ $it = XDB::iterator("SELECT e.id, e.titre, e.texte, e.post_id, a.user_id, a.nom, a.prenom, d.promo AS promo_display ,a.hruid,
p.x, p.y, p.attach IS NOT NULL AS img, FIND_IN_SET('wiki', e.flags) AS wiki,
FIND_IN_SET('important', e.flags) AS important,
e.creation_date > DATE_SUB(CURDATE(), INTERVAL 2 DAY) AS news,
FROM evenements AS e
LEFT JOIN evenements_photo AS p ON (e.id = p.eid)
INNER JOIN auth_user_md5 AS a ON (e.user_id = a.user_id)
- INNER JOIN profile_display AS d ON (d.uid = a.user_id)
+ INNER JOIN profile_display AS d ON (d.pid = a.user_id)
LEFT JOIN evenements_vus AS ev ON (e.id = ev.evt_id AND ev.user_id = {?})
WHERE FIND_IN_SET('valide', e.flags) AND peremption >= NOW()
AND (e.promo_min = 0 || e.promo_min <= {?})
require_once 'validations.inc.php';
- $res = XDB::query("SELECT e.entry_year, e.grad_year, d.promo_display, FIND_IN_SET('femme', u.flags) AS sexe
+ $res = XDB::query("SELECT e.entry_year, e.grad_year, d.promo, FIND_IN_SET('femme', u.flags) AS sexe
FROM auth_user_md5 AS u
- INNER JOIN profile_display AS d ON (d.uid = u.user_id)
+ INNER JOIN profile_display AS d ON (d.pid = u.user_id)
INNER JOIN profile_education AS e ON (e.uid = u.user_id AND FIND_IN_SET('primary', e.flags))
WHERE u.user_id = {?}", S::v('uid'));
protected function _fetchData()
{
// Checkout all data...
- $res = XDB::query("SELECT p.promo_display, e.entry_year AS entry_year, e.grad_year AS grad_year,
+ $res = XDB::query("SELECT p.promo AS promo_display, e.entry_year AS entry_year, e.grad_year AS grad_year,
u.nom_usage, u.nationalite, u.nationalite2, u.nationalite3, u.naissance,
t.display_tel as mobile, t.pub as mobile_pub,
d.email_directory as email_directory,
FROM auth_user_md5 AS u
INNER JOIN auth_user_quick AS q ON (u.user_id = q.user_id)
INNER JOIN profile_names_display AS n ON (n.user_id = u.user_id)
- INNER JOIN profile_display AS p ON (p.uid = u.user_id)
+ INNER JOIN profile_display AS p ON (p.pid = u.user_id)
INNER JOIN profile_education AS e ON (e.uid = u.user_id AND FIND_IN_SET('primary', e.flags))
LEFT JOIN profile_phones AS t ON (u.user_id = t.uid AND link_type = 'user')
LEFT JOIN profile_directory AS d ON (d.uid = u.user_id)
}
if ($this->changed['promo_display']) {
XDB::execute("UPDATE profile_display
- SET promo_display = {?}
- WHERE uid = {?}",
+ SET promo = {?}
+ WHERE pid = {?}",
$this->values['promo_display'], S::v('uid'));
}
}