Completed
Push — master ( e1f21c...1b0b82 )
by Megh
04:35
created
src/app/libraries/auth_lib.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,9 +45,9 @@
 block discarded – undo
45 45
     }
46 46
 
47 47
     private function admin_details() {
48
-         $object = new stdClass();
49
-         $object->preferred_username = "admin";
50
-         return $object;
48
+            $object = new stdClass();
49
+            $object->preferred_username = "admin";
50
+            return $object;
51 51
     }
52 52
 
53 53
     public function get_user_details() {
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,9 @@  discard block
 block discarded – undo
17 17
     }
18 18
 
19 19
     public function force_authentication() {
20
-        if ($this->is_authenticated()) return;
20
+        if ($this->is_authenticated()) {
21
+            return;
22
+        }
21 23
         $oidc = $this->construct_oidc();
22 24
         $oidc->authenticate();
23 25
     }
@@ -52,7 +54,9 @@  discard block
 block discarded – undo
52 54
 
53 55
     public function get_user_details() {
54 56
         global $cfg;
55
-        if ($cfg['debug']) return $this->admin_details();
57
+        if ($cfg['debug']) {
58
+            return $this->admin_details();
59
+        }
56 60
 
57 61
         $oidc = $this->construct_oidc();
58 62
         if (!$oidc->getIdToken()) {
@@ -60,7 +64,9 @@  discard block
 block discarded – undo
60 64
         }
61 65
 
62 66
         $details = $oidc->requestUserInfo();
63
-        if (isset($details->error)) $oidc->refreshTokens();
67
+        if (isset($details->error)) {
68
+            $oidc->refreshTokens();
69
+        }
64 70
         return $oidc->requestUserInfo();
65 71
     }
66 72
 }
Please login to merge, or discard this patch.