X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fauth%2Fauth.inc.php;h=305e0fc836f25dcf549d34ed29c1198862fc8286;hb=4bda530a6612ca8feba8c85777086af422daa22b;hp=83921e1da9285ed62fb7dfa1bd7583d0e7870981;hpb=4d97c734d9d513ea591fa5c2b2227d49f5abe19b;p=platal.git diff --git a/modules/auth/auth.inc.php b/modules/auth/auth.inc.php index 83921e1..305e0fc 100644 --- a/modules/auth/auth.inc.php +++ b/modules/auth/auth.inc.php @@ -42,7 +42,9 @@ function gpex_make($chlg, $privkey, $datafields, $charset) foreach ($fieldarr as $val) { /* on verifie qu'on n'a pas demandé une variable inexistante ! */ - if (S::has($val)) { + if ($val == 'perms') { + $params .= gpex_prepare_param($val, S::has_perms() ? 'admin' : 'user', $tohash, $charset); + } else if (S::has($val)) { $params .= gpex_prepare_param($val, S::v($val), $tohash, $charset); } else if (isset($personnal_data[$val])) { $params .= gpex_prepare_param($val, $personnal_data[$val], $tohash, $charset); @@ -60,12 +62,9 @@ function gpex_make($chlg, $privkey, $datafields, $charset) WHERE uid = {?} AND diminutif = {?}", S::v('uid'), $_GET['group']); $perms = $res->fetchOneCell(); - if (Session::has_perms()) { - $perms = 'admin'; - } } else { // if no group asked, return main rights - $perms = Session::has_perms()?'admin':'membre'; + $perms = S::has_perms() ? 'admin' : 'membre'; } $params .= gpex_prepare_param($val, $perms, $tohash, $charset); }