maj syntaxe accolades, maj jQuery, correction layout contact
[mtweb] / web / app / mods / users / identification.php
index 36b6d2b..4be3001 100644 (file)
@@ -1,17 +1,16 @@
 <?php
 
-  class mw_users_identification extends mw_mod
-  {
-    function index(&$env)
-    {
+  class mw_users_identification extends mw_mod{
+
+    function index(&$env){
     }
 
-    function login(&$env)
-    { if(!$env->user())
-      { $data = $env->data();
-        if($data->login(trim($_POST['login']), trim($_POST['pass'])))
-        { $env->redirect
-          ( isset($_POST["from"]) ? urldecode($_POST["from"]) : $this->env->url(),
+    function login(&$env){
+      if(!$env->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 &ecirc;tes maintenant identifi&eacute; en tant que ".$_POST['login']
           );
         }
       else $env->message("Vous &ecirc;tes d&eacute;j&agrave; identifi&eacute;");
     }
 
-    function logout(&$env)
-    { $data = $env->data();
-      if($data->logout())
-      { $env->redirect
-        ( $env->url(),
+    function logout(&$env){
+      $data = $env->data();
+      if($data->logout()){
+        $env->redirect(
+          $env->url(),
           "Vous n'&ecirc;tes plus identifi&eacute; sur le site"
         );
       }