Commit 12d4a25f authored by BenC's avatar BenC
Browse files

Ajout du meta-groupe "responsables-clubs"

parent afab724b
......@@ -185,6 +185,7 @@ class group extends stdentity
$values[10006] = "etudiants-utbm-tous";
$values[10007] = "etudiants-tous";
$values[10008] = "utilisateurs-valides";
$values[10009] = "responsables-clubs";
$req = new requete($this->db,
"SELECT `id_asso`, `nom_unix_asso` " .
......@@ -289,6 +290,9 @@ class group extends stdentity
if ( $this->id == 10008 )
return "utilisateurs dont le compte a été modéré";
if ( $this->id == 10009 )
return "responsables des clubs";
return trim($this->description);
}
......@@ -305,4 +309,4 @@ function enumerates_groups($db)
return $grp->enumerate();
}
?>
\ No newline at end of file
?>
......@@ -571,7 +571,7 @@ class utilisateur extends stdentity
if ( $this->ancien_etudiant )
$this->groupes[10002] = "etudiants-anciens";
if ( $this->etudiant )
if ( $this->etudiant )
$this->groupes[10003] = "etudiants-actuels";
if ( $this->etudiant && $this->utbm )
......@@ -610,6 +610,17 @@ class utilisateur extends stdentity
$this->groupes[$id+30000] = $name."-membres";
}
$req = new requete($this->db,
"SELECT `id_utilisateur` ".
"FROM `asso_membre` ".
"INNER JOIN `asso` USING(`id_asso`) ".
"WHERE `date_fin` IS NULL and `role`='10' ".
"AND `id_utilisateur`='".$this->id."' " .
"AND `id_asso_parent` IN (SELECT `id_asso` FROM `asso` WHERE `id_asso_parent`='1')");
if ( $req->lines > 0 )
$this->groupes[10009] = "responsables-clubs";
if ( !isset($this->promo_utbm) )
$this->load_all_extra();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment