CONCAT(b.alias, '@m4x.org') AS email,
CONCAT(b.alias, '@polytechnique.org') AS email2,
m.perms='admin' AS perms, m.origine,
- FIND_IN_SET(flags, 'femme') AS sexe
+ FIND_IN_SET(u.flags, 'femme') AS sexe
FROM auth_user_md5 AS u
INNER JOIN aliases AS a ON ( u.user_id = a.id AND a.type != 'homonyme' )
INNER JOIN aliases AS b ON ( u.user_id = b.id AND b.type = 'a_vie' )
function handler_admin_member_new_ajax(&$page)
{
+ header('Content-Type: text/html; charset="iso-8859-15"');
$page->changeTpl('xnet/groupe/membres-new-search.tpl', NO_SKIN);
list($nom, $prenom) = str_replace(array('-', ' ', "'"), '%', array(Env::v('nom'), Env::v('prenom')));
$where = "perms = 'pending'";
if (!empty($prenom)) {
$where .= " AND prenom LIKE '%$prenom%'";
}
- if (is_numeric(Env::v('promo'))) {
+ if (preg_match('/^[0-9]{4}$/', Env::v('promo'))) {
$where .= " AND promo = " . Env::i('promo');
+ } elseif (Env::has('promo')) {
+ return;
}
$res = XDB::iterator("SELECT user_id, nom, prenom, promo
FROM auth_user_md5