Completed
Push — master ( c26241...09c353 )
by Ankit
02:23
created
logout.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
 {
9 9
 	Session::forget('start');
10 10
 	header('Location: index.php');
11
-}
12
-else
11
+} else
13 12
 {
14 13
 	echo "Please Login";
15 14
 }
Please login to merge, or discard this patch.
source/Validate.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
 		{
19 19
 			if ($result->num_rows > 0) {
20 20
 				return 1;
21
+			} else {
22
+							return 0;
21 23
 			}
22
-			else
23
-				return 0;
24 24
 		}
25 25
 	}
26 26
 
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
 		if ($result = $this->connect->query($query)) {
31 31
 			if ($result->num_rows > 0) {
32 32
 				return 1;
33
+			} else {
34
+							return 0;
33 35
 			}
34
-			else
35
-				return 0;
36 36
 		}
37 37
 	}
38 38
 }
Please login to merge, or discard this patch.
ajax/validate_login.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,8 +11,9 @@
 block discarded – undo
11 11
 	$password = $loginField->password;
12 12
 	$obLogin = new Login();
13 13
 	$result = $obLogin->authLogin($login, $password);
14
-	if(isset($result))
15
-		echo $result;
16
-	else
17
-		echo json_encode([]);
18
-}
19 14
\ No newline at end of file
15
+	if(isset($result)) {
16
+			echo $result;
17
+	} else {
18
+			echo json_encode([]);
19
+	}
20
+	}
20 21
\ No newline at end of file
Please login to merge, or discard this patch.
ajax/validate_register.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,9 +12,10 @@
 block discarded – undo
12 12
 	$password = $loginField->password;
13 13
 	$obLogin = new Login();
14 14
 	$result = $obLogin->authLogin($login, $password);
15
-	if(isset($result))
16
-		echo $result;
17
-	else
18
-		echo json_encode([]);
19
-}
15
+	if(isset($result)) {
16
+			echo $result;
17
+	} else {
18
+			echo json_encode([]);
19
+	}
20
+	}
20 21
 ?>
Please login to merge, or discard this patch.
source/Login.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@
 block discarded – undo
63 63
 				return json_encode($this->error);
64 64
 			}
65 65
 			return json_encode(["Error" => "You are not registered, ".$this->connect->error ]);
66
-		}
67
-		else
66
+		} else
68 67
 		{
69 68
 			return json_encode($this->error);
70 69
 		}
Please login to merge, or discard this patch.
source/Register.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,7 @@
 block discarded – undo
33 33
 		if(filter_var($email, FILTER_VALIDATE_EMAIL) == false)
34 34
 		{
35 35
 			$this->onError("email", " *Enter correct Email address");
36
-		}
37
-		else if($this->obValidate->validateEmailInDb($email) === 1)
36
+		} else if($this->obValidate->validateEmailInDb($email) === 1)
38 37
 		{
39 38
 			$this->onError("email", " *Email is already registered");
40 39
 		}
Please login to merge, or discard this patch.