X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;f=mw%2Fapp%2Fmods%2Fusers%2Fidentification.php;fp=mw%2Fapp%2Fmods%2Fusers%2Fidentification.php;h=4be3001d205b2e42c4a5ccb65d463176f25958a0;hb=36ed114046cbe3d72a3589230e9f306a54fcc79d;hp=0000000000000000000000000000000000000000;hpb=281c96e95451269f2614684b8de5be25862c8374;p=mtweb diff --git a/mw/app/mods/users/identification.php b/mw/app/mods/users/identification.php new file mode 100644 index 0000000..4be3001 --- /dev/null +++ b/mw/app/mods/users/identification.php @@ -0,0 +1,35 @@ +user()){ + $data = $env->data(); + if($data->login(trim($_POST['login']), trim($_POST['pass']))){ + $env->redirect( + isset($_POST["from"]) ? urldecode($_POST["from"]) : $this->env->url(), + "Vous êtes maintenant identifié en tant que ".$_POST['login'] + ); + } + else $env->message("Idantifiants incorrects"); + } + else $env->message("Vous êtes déjà identifié"); + } + + function logout(&$env){ + $data = $env->data(); + if($data->logout()){ + $env->redirect( + $env->url(), + "Vous n'êtes plus identifié sur le site" + ); + } + else $env->message("Erreur lors de la deconnection. il se peut que vous soyez encore identifié"); + } + + } + +?> \ No newline at end of file