fix to check is parent
This commit is contained in:
parent
b7998009a0
commit
84c2e7a3ad
2 changed files with 7 additions and 1 deletions
|
@ -69,8 +69,10 @@ class Eleve {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isParent($username) {
|
public function isParent($username) {
|
||||||
|
// echo "<p>username :".$username."</p>";
|
||||||
foreach ($this->parents as $parent) {
|
foreach ($this->parents as $parent) {
|
||||||
if ($parent->getNom() == $username) {
|
// echo "<p>parent :".var_dump($parent)."</p>";
|
||||||
|
if ($parent->getUserId() == $username) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,10 @@ class ParentEleve {
|
||||||
// echo "<p>".var_dump($this)."</p>";
|
// echo "<p>".var_dump($this)."</p>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getUserId() {
|
||||||
|
return $this->user['bf_titre'];
|
||||||
|
}
|
||||||
|
|
||||||
public function getNom() {
|
public function getNom() {
|
||||||
if (empty($this->user['bf_nom'])) {
|
if (empty($this->user['bf_nom'])) {
|
||||||
return $this->user['bf_titre'];
|
return $this->user['bf_titre'];
|
||||||
|
|
Loading…
Reference in a new issue