projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Renames uid to pid in search_name table.
[platal.git]
/
modules
/
xnetgrp.php
diff --git
a/modules/xnetgrp.php
b/modules/xnetgrp.php
index
254819b
..
a1f3970
100644
(file)
--- a/
modules/xnetgrp.php
+++ b/
modules/xnetgrp.php
@@
-340,7
+340,7
@@
class XnetGrpModule extends PLModule
{
global $globals;
$vcard = new VCard($photos == 'photos', 'Membre du groupe ' . $globals->asso('nom'));
{
global $globals;
$vcard = new VCard($photos == 'photos', 'Membre du groupe ' . $globals->asso('nom'));
- $vcard->add
Users($globals->asso()->getMembers()->getUID
s());
+ $vcard->add
Profiles($globals->asso()->getMembers()->getProfile
s());
$vcard->show();
}
$vcard->show();
}
@@
-474,8
+474,8
@@
class XnetGrpModule extends PLModule
CONCAT(al.alias,"@polytechnique.org"),
m.email)
FROM group_members AS m
CONCAT(al.alias,"@polytechnique.org"),
m.email)
FROM group_members AS m
- INNER JOIN
#x4dat#.
aliases AS al ON (al.type = "a_vie"
- AND al.id = m.uid)
+ INNER JOIN aliases AS al ON (al.type = "a_vie"
+ AND al.
u
id = m.uid)
WHERE perms="admin" AND m.asso_id = {?}',
$globals->asso('id'));
$emails = $res->fetchColumn();
WHERE perms="admin" AND m.asso_id = {?}',
$globals->asso('id'));
$emails = $res->fetchColumn();
@@
-532,7
+532,7
@@
class XnetGrpModule extends PLModule
$it = XDB::iterator('SELECT s.uid, a.hruid, s.ts AS date
FROM group_member_sub_requests AS s
$it = XDB::iterator('SELECT s.uid, a.hruid, s.ts AS date
FROM group_member_sub_requests AS s
- INNER JOIN
#x4dat#.
accounts AS a ON(s.uid = a.uid)
+ INNER JOIN accounts AS a ON(s.uid = a.uid)
WHERE s.asso_id = {?}
ORDER BY s.ts', $globals->asso('id'));
$page->changeTpl('xnetgrp/subscribe-valid.tpl');
WHERE s.asso_id = {?}
ORDER BY s.ts', $globals->asso('id'));
$page->changeTpl('xnetgrp/subscribe-valid.tpl');
@@
-590,7
+590,7
@@
class XnetGrpModule extends PLModule
$not_in_group_ext = array();
foreach ($subscribers as $mail) {
$not_in_group_ext = array();
foreach ($subscribers as $mail) {
- $uf = new UserFilter(new
U
FC_And(new UFC_Group($globals->asso('id')),
+ $uf = new UserFilter(new
P
FC_And(new UFC_Group($globals->asso('id')),
new UFC_Email($mail)));
if ($uf->getTotalCount() == 0) {
if (User::isForeignEmailAddress($mail)) {
new UFC_Email($mail)));
if ($uf->getTotalCount() == 0) {
if (User::isForeignEmailAddress($mail)) {
@@
-675,12
+675,12
@@
class XnetGrpModule extends PLModule
}
if (empty($users)) {
list($nom, $prenom) = str_replace(array('-', ' ', "'"), '%', array(Env::t('nom'), Env::t('prenom')));
}
if (empty($users)) {
list($nom, $prenom) = str_replace(array('-', ' ', "'"), '%', array(Env::t('nom'), Env::t('prenom')));
- $cond = new
UFC_And(new U
FC_Not(new UFC_Registered()));
+ $cond = new
PFC_And(new P
FC_Not(new UFC_Registered()));
if (!empty($nom)) {
if (!empty($nom)) {
- $cond->addChild(new UFC_Name(
UserFilter
::LASTNAME, $nom, UFC_Name::CONTAINS));
+ $cond->addChild(new UFC_Name(
Profile
::LASTNAME, $nom, UFC_Name::CONTAINS));
}
if (!empty($prenom)) {
}
if (!empty($prenom)) {
- $cond->addChild(new UFC_Name(
UserFilter
::FIRSTNAME, $prenom, UFC_Name::CONTAINS));
+ $cond->addChild(new UFC_Name(
Profile
::FIRSTNAME, $prenom, UFC_Name::CONTAINS));
}
if (Env::i('promo')) {
$cond->addChild(new UFC_Promo('=', UserFilter::GRADE_ING, Env::i('promo')));
}
if (Env::i('promo')) {
$cond->addChild(new UFC_Promo('=', UserFilter::GRADE_ING, Env::i('promo')));
@@
-794,14
+794,14
@@
class XnetGrpModule extends PLModule
private function changeLogin(PlPage &$page, PlUser &$user, MMList &$mmlist, $login)
{
private function changeLogin(PlPage &$page, PlUser &$user, MMList &$mmlist, $login)
{
- require_once 'user.func.inc.php';
// Search the uid of the user...
// Search the uid of the user...
- $res = XDB::query("SELECT f.id, f.alias
+ $res = XDB::query("SELECT f.
u
id, f.alias
FROM aliases AS a
FROM aliases AS a
- INNER JOIN aliases AS f ON (f.
id = a.
id AND f.type = 'a_vie')
+ INNER JOIN aliases AS f ON (f.
uid = a.u
id AND f.type = 'a_vie')
WHERE a.alias = {?}",
$login);
if ($res->numRows() == 0) {
WHERE a.alias = {?}",
$login);
if ($res->numRows() == 0) {
+ // TODO: replace this call to a removed function.
$x = get_not_registered_user($login);
if (!$x) {
$page->trigError("Le login $login ne correspond à aucun X.");
$x = get_not_registered_user($login);
if (!$x) {
$page->trigError("Le login $login ne correspond à aucun X.");