Completed
Push — master ( cad261...f6dfc7 )
by Hugo
02:38
created
app/controllers/UsersController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -24,30 +24,30 @@  discard block
 block discarded – undo
24 24
     public function signInAction() {
25 25
     	$bootstrap = $this->jquery->bootstrap();
26 26
     	 
27
-    	if(!empty($_POST['identite']) && !empty($_POST['password'])) {
27
+    	if (!empty($_POST['identite']) && !empty($_POST['password'])) {
28 28
     		
29
-    		$userPseudo = User::findFirst("identite = '".$_POST['identite']."'");
29
+    		$userPseudo = User::findFirst("identite = '" . $_POST['identite'] . "'");
30 30
 
31
-    		$userMail = User::findFirst("mail = '".$_POST['identite']."'");
31
+    		$userMail = User::findFirst("mail = '" . $_POST['identite'] . "'");
32 32
     	
33
-    		if($userPseudo != NULL && password_verify($_POST['password'], $userPseudo->getPassword())) {
33
+    		if ($userPseudo != NULL && password_verify($_POST['password'], $userPseudo->getPassword())) {
34 34
     			$this->session->set("user", $userPseudo);
35 35
     			$this->response->redirect("Index/index");
36 36
     			$this->loadAclAction($userPseudo->getIdTypeUser());
37
-    		} else if($userMail != NULL && password_verify($_POST['password'], $userMail->getPassword())) {
37
+    		} else if ($userMail != NULL && password_verify($_POST['password'], $userMail->getPassword())) {
38 38
     			$this->session->set("user", $userMail);
39 39
     			$this->response->redirect("Index/index");
40 40
     			$this->loadAclAction($userMail->getIdTypeUser());
41 41
     		} else {
42
-    			echo $bootstrap->htmlAlert("alert1","L'identifiant ou le mot de passe est incorrecte.");
42
+    			echo $bootstrap->htmlAlert("alert1", "L'identifiant ou le mot de passe est incorrecte.");
43 43
     		}
44 44
     	}
45 45
     }
46 46
 	
47 47
 	public function rulesAction() {
48
-		$accordion=$this->jquery->bootstrap()->htmlAccordion("accordion1");
49
-		$accordion->addPanel("Panel 1","Contenu du panel 1");
50
-		$accordion->addPanel("Panel 2","Contenu du panel 2");
48
+		$accordion = $this->jquery->bootstrap()->htmlAccordion("accordion1");
49
+		$accordion->addPanel("Panel 1", "Contenu du panel 1");
50
+		$accordion->addPanel("Panel 2", "Contenu du panel 2");
51 51
 		echo $accordion;
52 52
 	}
53 53
 
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
 
75 75
         $this->jquery->compile($this->view);
76 76
 
77
-        }else {
77
+        } else {
78 78
             $this->view->pick("main/error");
79 79
         }
80 80
     }
81 81
 
82
-    public function passwordAction(){
82
+    public function passwordAction() {
83 83
         $password = password_hash("password", PASSWORD_DEFAULT);
84 84
         echo $password;
85 85
     }
Please login to merge, or discard this patch.
app/models/Acl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@
 block discarded – undo
161 161
         return parent::findFirst($parameters);
162 162
     }
163 163
 
164
-    public function toString(){
165
-        return " ".$this->getRessource()->getLibelle()." accessible par ".$this->getTypeUser()->getLibelle()." en droit '".$this->getOperation()->getOperation()."'";
164
+    public function toString() {
165
+        return " " . $this->getRessource()->getLibelle() . " accessible par " . $this->getTypeUser()->getLibelle() . " en droit '" . $this->getOperation()->getOperation() . "'";
166 166
     }
167 167
 }
168 168
\ No newline at end of file
Please login to merge, or discard this patch.