mirror of
https://framagit.org/framasoft/framadate/framadate
synced 2026-07-28 12:04:23 +00:00
Merge pull request #40 from fevrier/optional_REMOTE_USER
Rend optionnelle l'utilisation de la variable REMOTE_USER
This commit is contained in:
commit
4c6fc65603
4 changed files with 10 additions and 7 deletions
|
|
@ -136,7 +136,7 @@ if (!is_error(NO_POLL) && (isset($_POST["boutonp"]) || isset($_POST["boutonp_x"]
|
|||
$err |= NAME_EMPTY;
|
||||
}
|
||||
|
||||
if(!is_error(NAME_EMPTY) && (!isset($_SERVER['REMOTE_USER']) || $_POST["nom"] == $_SESSION["nom"])) {
|
||||
if(!is_error(NAME_EMPTY) && (! ( USE_REMOTE_USER && isset($_SERVER['REMOTE_USER']) ) || $_POST["nom"] == $_SESSION["nom"])) {
|
||||
$nouveauchoix = '';
|
||||
for ($i=0;$i<$nbcolonnes;$i++) {
|
||||
// Si la checkbox est enclenchée alors la valeur est 1
|
||||
|
|
@ -444,7 +444,7 @@ while ($data = $user_studs->FetchNextObject(false)) {
|
|||
$ensemblereponses = $data->reponses;
|
||||
|
||||
// ligne d'un usager pré-authentifié
|
||||
$mod_ok = !isset($_SERVER['REMOTE_USER']) || ($nombase == $_SESSION['nom']);
|
||||
$mod_ok = !( USE_REMOTE_USER && isset($_SERVER['REMOTE_USER']) ) || ($nombase == $_SESSION['nom']);
|
||||
$user_mod |= $mod_ok;
|
||||
|
||||
// pour chaque colonne
|
||||
|
|
@ -490,7 +490,7 @@ while ($data = $user_studs->FetchNextObject(false)) {
|
|||
}
|
||||
|
||||
// affichage de la ligne pour un nouvel utilisateur
|
||||
if (!isset($_SERVER['REMOTE_USER']) || !$user_mod) {
|
||||
if (! ( USE_REMOTE_USER && isset($_SERVER['REMOTE_USER']) ) || !$user_mod) {
|
||||
echo '<tr class="ajout_reponse">'."\n";
|
||||
echo '<td class="nom">'."\n";
|
||||
if (isset($_SESSION['nom'])) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue