projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merges
[platal.git]
/
modules
/
auth
/
auth.inc.php
diff --git
a/modules/auth/auth.inc.php
b/modules/auth/auth.inc.php
index
64aa66e
..
dbc50f7
100644
(file)
--- a/
modules/auth/auth.inc.php
+++ b/
modules/auth/auth.inc.php
@@
-21,28
+21,27
@@
/* cree le champs "auth" renvoye au Groupe X */
function gpex_make_auth($chlg, $privkey, $datafields) {
/* cree le champs "auth" renvoye au Groupe X */
function gpex_make_auth($chlg, $privkey, $datafields) {
- global $globals;
$fieldarr = explode(",",$datafields);
$tohash = "1$chlg$privkey";
$fieldarr = explode(",",$datafields);
$tohash = "1$chlg$privkey";
- $res =
$globals->xdb->
query("SELECT matricule, matricule_ax, promo,
+ $res =
XDB::
query("SELECT matricule, matricule_ax, promo,
promo_sortie, flags, deces, nom,
prenom, nationalite, section,
naissance
FROM auth_user_md5 WHERE user_id = {?}",
promo_sortie, flags, deces, nom,
prenom, nationalite, section,
naissance
FROM auth_user_md5 WHERE user_id = {?}",
- S
ession::getInt
('uid'));
+ S
::v
('uid'));
$personnal_data = $res->fetchOneAssoc();
foreach ($fieldarr as $val) {
/* on verifie qu'on n'a pas demandé une variable inexistante ! */
$personnal_data = $res->fetchOneAssoc();
foreach ($fieldarr as $val) {
/* on verifie qu'on n'a pas demandé une variable inexistante ! */
- if (S
ession
::has($val)) {
- $tohash .= S
ession::get
($val);
+ if (S::has($val)) {
+ $tohash .= S
::v
($val);
} else if (isset($personnal_data[$val])) {
$tohash .= $personnal_data[$val];
} else if ($val == 'username') {
} else if (isset($personnal_data[$val])) {
$tohash .= $personnal_data[$val];
} else if ($val == 'username') {
- $res =
$globals->xdb->
query("SELECT alias FROM aliases
+ $res =
XDB::
query("SELECT alias FROM aliases
WHERE id = {?} AND FIND_IN_SET('bestalias', flags)",
WHERE id = {?} AND FIND_IN_SET('bestalias', flags)",
- S
ession::getInt
('uid'));
+ S
::v
('uid'));
$min_username = $res->fetchOneCell();
$tohash .= $min_username;
}
$min_username = $res->fetchOneCell();
$tohash .= $min_username;
}
@@
-53,28
+52,27
@@
function gpex_make_auth($chlg, $privkey, $datafields) {
/* cree les parametres de l'URL de retour avec les champs demandes */
function gpex_make_params($chlg, $privkey, $datafields) {
/* cree les parametres de l'URL de retour avec les champs demandes */
function gpex_make_params($chlg, $privkey, $datafields) {
- global $globals;
$params = "&auth=".gpex_make_auth($chlg, $privkey, $datafields);
$params = "&auth=".gpex_make_auth($chlg, $privkey, $datafields);
- $res =
$globals->xdb->
query("SELECT matricule, matricule_ax, promo,
+ $res =
XDB::
query("SELECT matricule, matricule_ax, promo,
promo_sortie, flags, deces, nom,
prenom, nationalite, section,
naissance
FROM auth_user_md5 WHERE user_id = {?}",
promo_sortie, flags, deces, nom,
prenom, nationalite, section,
naissance
FROM auth_user_md5 WHERE user_id = {?}",
- S
ession::getInt
('uid'));
+ S
::v
('uid'));
$personnal_data = $res->fetchOneAssoc();
$fieldarr = explode(",",$datafields);
foreach ($fieldarr as $val) {
$personnal_data = $res->fetchOneAssoc();
$fieldarr = explode(",",$datafields);
foreach ($fieldarr as $val) {
- if (S
ession
::has($val)) {
- $tohash .= S
ession::get
($val);
+ if (S::has($val)) {
+ $tohash .= S
::v
($val);
} else if (isset($personnal_data[$val])) {
$params .= "&$val=".$personnal_data[$val];
} else if ($val == 'username') {
} else if (isset($personnal_data[$val])) {
$params .= "&$val=".$personnal_data[$val];
} else if ($val == 'username') {
- $res =
$globals->xdb->
query("SELECT alias FROM aliases
+ $res =
XDB::
query("SELECT alias FROM aliases
WHERE id = {?} AND FIND_IN_SET('bestalias', flags)",
WHERE id = {?} AND FIND_IN_SET('bestalias', flags)",
- S
ession::getInt
('uid'));
+ S
::v
('uid'));
$min_username = $res->fetchOneCell();
$params .= "&$val=".$min_username;
}
$min_username = $res->fetchOneCell();
$params .= "&$val=".$min_username;
}