X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;ds=sidebyside;f=mw%2Fapp%2Fcontrollers%2Fusers%2Fcompte.php;fp=mw%2Fapp%2Fcontrollers%2Fusers%2Fcompte.php;h=c05a1a0dbffc1289f8b3605c37ae8edf0c16ab11;hb=422d883e3ed8ee55ee41e3b7826f32b79cea646d;hp=0000000000000000000000000000000000000000;hpb=e1b64e4088232b9d7b4acb2dc24279bb38fcafba;p=mtweb diff --git a/mw/app/controllers/users/compte.php b/mw/app/controllers/users/compte.php new file mode 100644 index 0000000..c05a1a0 --- /dev/null +++ b/mw/app/controllers/users/compte.php @@ -0,0 +1,39 @@ +validation_result = true; + if($this->validation_result === true) $this->validate_roles(); + if($this->validation_result === true) $this->validate_user(); + return $this->validation_result; + } + + function validate_roles(){ + $env = $this->env(); + $data = $env->data(); + if(($this->roles = $data->roles()) !== false) $this->validation_result = true; + else $this->validation_result = "impossible de lire la liste des roles"; + } + + function validate_user(){ + $env = $this->env(); + if($this->user = $env->user()) $this->validation_result = true; + else $this->validation_result = "Vous devez être identifier pour accéder à cette page"; + } + + function index(){ + $env = $this->env(); + if($this->validation_result === true){ + $env->run("users/infos"); + } + } + + } + +?> \ No newline at end of file