fetchOneAssoc(); foreach ($fieldarr as $val) { /* on verifie qu'on n'a pas demandé une variable inexistante ! */ if (S::has($val)) { $tohash .= S::v($val); $params .= "&$val=".S::v($val); } else if (isset($personnal_data[$val])) { $tohash .= $personnal_data[$val]; $params .= "&$val=".$personnal_data[$val]; } else if ($val == 'username') { $res = XDB::query("SELECT alias FROM aliases WHERE id = {?} AND FIND_IN_SET('bestalias', flags)", S::v('uid')); $min_username = $res->fetchOneCell(); $tohash .= $min_username; $params .= "&$val=".$min_username; } else if ($val == 'grpauth' && isset($_GET['group'])) { $res = XDB::query("SELECT perms FROM groupex.membres INNER JOIN groupex.asso ON(id = asso_id) WHERE uid = {?} AND diminutif = {?}", S::v('uid'), $_GET['group']); $perms = $res->fetchOneCell(); $tohash .= $perms; $params .= "&$val=".$perms; } } $tohash .= "1"; $auth = md5($tohash); return array($auth, "&auth=".$auth.$params); } /* cree le champs "auth" renvoye au Groupe X */ function gpex_make_auth($chlg, $privkey, $datafields) { list ($auth, $param) = gpex_make($chlg, $privkey, $datafields); return $auth; } /* cree les parametres de l'URL de retour avec les champs demandes */ function gpex_make_params($chlg, $privkey, $datafields) { list ($auth, $param) = gpex_make($chlg, $privkey, $datafields); return $param; } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>