Completed
Pull Request — master (#203)
by
unknown
05:09
created
public_html/tc/config/php.config.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@
 block discarded – undo
8 8
 
9 9
 if (DEBUG_MODE) {
10 10
     ini_set("display_errors", 1);
11
-} else {
11
+}else {
12 12
     ini_set("display_errors", 0);
13 13
 }
14 14
 
15 15
 set_time_limit(0);
16 16
 
17
-if(!isset($_SESSION)){
17
+if (!isset($_SESSION)) {
18 18
     session_start();
19 19
 }
20 20
 
Please login to merge, or discard this patch.
public_html/tc/config/auth.config.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@
 block discarded – undo
9 9
 
10 10
 define("OPENID_URI", "https://account.gccollab.ca/openid");
11 11
 
12
-define("OPENID_JWKS_URI","https://account.gccollab.ca/openid/jwks");
12
+define("OPENID_JWKS_URI", "https://account.gccollab.ca/openid/jwks");
13 13
 
14
-define("AUTH_URI","/authorize");
14
+define("AUTH_URI", "/authorize");
15 15
 
16 16
 define("REGISTER_URI", "https://account.gccollab.ca/register");
17 17
 
Please login to merge, or discard this patch.
public_html/tc/config/constants.config.inc 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@
 block discarded – undo
4 4
 define("HOMEPAGE_URI_ADMIN", "https://tc.gccollab.ca/admin");
5 5
 
6 6
 define("ID_TOKEN", "idToken");
7
-define("ACCESS_TOKEN","accessToken");
8
-define("REFRESH_TOKEN","refreshToken");
7
+define("ACCESS_TOKEN", "accessToken");
8
+define("REFRESH_TOKEN", "refreshToken");
9 9
 
10
-define("ROLE_ADMIN","administrator");
11
-define("ROLE_APPLICANT","jobseeker");
12
-define("ROLE_MANAGER","manager");
10
+define("ROLE_ADMIN", "administrator");
11
+define("ROLE_APPLICANT", "jobseeker");
12
+define("ROLE_MANAGER", "manager");
13 13
 ?>
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
public_html/tc/controller/AuthenticationController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
         
79 79
         //Ensure this token was meant for us
80 80
         // Allow validating of keys created up a few seconds in the future, to allow for response time if we're currently waiting on a refreshing token
81
-        $expectation = new ValidationData(time()+NETWORK_REQUEST_TIMEOUT); 
81
+        $expectation = new ValidationData(time() + NETWORK_REQUEST_TIMEOUT); 
82 82
         $expectation->setIssuer(OPENID_URI);
83 83
         $expectation->setAudience(CLIENT_ID);   
84 84
         $claimIsValid = $token->validate($expectation);
Please login to merge, or discard this patch.
public_html/tc/controller/UserController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             $newUser->setUser_role(ROLE_APPLICANT);
87 87
             $newUser->setIs_confirmed(true);
88 88
             $user = UserController::registerUser($newUser);
89
-        } else {
89
+        }else {
90 90
             throw Exception("Unable to access openId userInfo");
91 91
         }
92 92
         return $user;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         //if user_id is not null, then log the user in automatically
106 106
         if ($existingUser) {
107 107
             return $existingUser;
108
-        } else {
108
+        }else {
109 109
             return null;
110 110
             /*
111 111
               //if user_id is null, then the user is not registered and we should register them automatically
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                 $jobSeekerProfile = new JobSeekerProfile();
144 144
                 JobSeekerController::addJobSeekerProfile($jobSeekerProfile, $userId);
145 145
             }
146
-        } else if ($user->getUser_role() === ROLE_ADMIN) {
146
+        }else if ($user->getUser_role() === ROLE_ADMIN) {
147 147
 
148 148
             $userId = $user->getUser_id();
149 149
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
             if ($oldUser->getEmail() != $updatedUser->getEmail()) {
187 187
                 $confEmailSent = UserController::confirmEmail($updatedUser);
188 188
                 $updatedUser->setIs_confirmed(false);
189
-            } else {
189
+            }else {
190 190
                 $updatedUser->setIs_confirmed($oldUser->getIs_confirmed());
191 191
             }
192 192
             $updateSuccessful = UserDAO::updateUser($updatedUser); //do updates
Please login to merge, or discard this patch.
public_html/tc/services/SubmitJobApplication.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
                 $json = json_encode($result, JSON_PRETTY_PRINT);
56 56
                 echo($json);
57 57
                         
58
-            } else {
58
+            }else {
59 59
                 header('HTTP/1.0 401 Unauthorized');
60 60
                 echo json_encode(array("failed" => 'Invalid arguments provided'), JSON_FORCE_OBJECT);
61 61
                 exit;
Please login to merge, or discard this patch.
public_html/tc/services/JobSeekers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@
 block discarded – undo
32 32
         $userPermissions[] = new UserPermission(ROLE_ADMIN);
33 33
         AuthenticationController::validateUser($userPermissions);
34 34
         
35
-        if(strlen($requestParams) > 1){
35
+        if (strlen($requestParams) > 1) {
36 36
             $result = JobSeekerController::getJobSeekers();
37 37
             $json = json_encode($result, JSON_PRETTY_PRINT);
38 38
             echo($json);
39
-        } else {
39
+        }else {
40 40
             $result = array();
41 41
             $json = json_encode($result, JSON_PRETTY_PRINT);
42 42
             echo($json);
Please login to merge, or discard this patch.
public_html/tc/services/FullJobApplication.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
             $json = json_encode($fullJobApplication, JSON_PRETTY_PRINT);
50 50
             echo($json);
51 51
 
52
-        } else {
52
+        }else {
53 53
             header('HTTP/1.0 400 Bad Request');
54 54
             echo json_encode(array("failed" => 'No request parameters provided'), JSON_FORCE_OBJECT);
55 55
             exit;
Please login to merge, or discard this patch.
public_html/tc/services/ManagerProfile.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     $user_id_param_index = 4;
23 23
     switch ($requestMethod) {
24 24
         case 'GET':
25
-            if(strlen($requestParams) > 1){
25
+            if (strlen($requestParams) > 1) {
26 26
                 //Manager Profile is public, no authentication needed
27 27
                 
28 28
                 $user_id = Utils::getParameterFromRequest($requestParams, $user_id_param_index);
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
                 if ($result === false) {
33 33
                     header('HTTP/1.0 404 Not Found');
34 34
                     echo json_encode(array("failed" => "Manager Profile does not exist for specified user"), JSON_FORCE_OBJECT);
35
-                } else {
35
+                }else {
36 36
                     $json = json_encode($result, JSON_PRETTY_PRINT);
37 37
                     echo($json);
38 38
                 }
39
-            } else {
39
+            }else {
40 40
                 $result = array();
41 41
                 $json = json_encode($result, JSON_PRETTY_PRINT);
42 42
                 echo($json);
Please login to merge, or discard this patch.