@@ -34,18 +34,18 @@ discard block |
||
34 | 34 | |
35 | 35 | protected function doRequest($type, $endpoint, $params=array()) |
36 | 36 | { |
37 | - $base = ($this->useSSL) ? "https" : "http"; |
|
38 | - $url = $base . "://" . $this->host . ":" .$this->port.$this->plugin.$endpoint; |
|
37 | + $base = ($this->useSSL) ? "https" : "http"; |
|
38 | + $url = $base . "://" . $this->host . ":" .$this->port.$this->plugin.$endpoint; |
|
39 | 39 | |
40 | - if ($this->useBasicAuth) |
|
40 | + if ($this->useBasicAuth) |
|
41 | 41 | $auth = 'Basic ' . base64_encode($this->basicUser . ':' . $this->basicPwd); |
42 | 42 | else |
43 | 43 | $auth = $this->secret; |
44 | 44 | |
45 | - $headers = array( |
|
46 | - 'Accept' => 'application/json', |
|
47 | - 'Authorization' => $auth |
|
48 | - ); |
|
45 | + $headers = array( |
|
46 | + 'Accept' => 'application/json', |
|
47 | + 'Authorization' => $auth |
|
48 | + ); |
|
49 | 49 | |
50 | 50 | $body = json_encode($params); |
51 | 51 | |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | */ |
86 | 86 | public function getUsers() |
87 | 87 | { |
88 | - $endpoint = '/users'; |
|
89 | - return $this->doRequest('get',$endpoint); |
|
88 | + $endpoint = '/users'; |
|
89 | + return $this->doRequest('get',$endpoint); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | |
@@ -147,12 +147,12 @@ discard block |
||
147 | 147 | return $this->doRequest('put', $endpoint, compact('username', 'password','name','email', 'groups')); |
148 | 148 | } |
149 | 149 | |
150 | - /** |
|
151 | - * locks/Disables an OpenFire user |
|
152 | - * |
|
153 | - * @param string $username Username |
|
154 | - * @return json|false Json with data or error, or False when something went fully wrong |
|
155 | - */ |
|
150 | + /** |
|
151 | + * locks/Disables an OpenFire user |
|
152 | + * |
|
153 | + * @param string $username Username |
|
154 | + * @return json|false Json with data or error, or False when something went fully wrong |
|
155 | + */ |
|
156 | 156 | public function lockoutUser($username) |
157 | 157 | { |
158 | 158 | $endpoint = '/lockouts/'.$username; |