@@ -30,12 +30,12 @@ discard block |
||
30 | 30 | |
31 | 31 | protected function doRequest($type, $endpoint, $params=array()) |
32 | 32 | { |
33 | - $base = ($this->useSSL) ? "https" : "http"; |
|
34 | - $url = $base . "://" . $this->host . ":" .$this->port.$this->plugin.$endpoint; |
|
35 | - $headers = array( |
|
36 | - 'Accept' => 'application/json', |
|
37 | - 'Authorization' => $this->secret |
|
38 | - ); |
|
33 | + $base = ($this->useSSL) ? "https" : "http"; |
|
34 | + $url = $base . "://" . $this->host . ":" .$this->port.$this->plugin.$endpoint; |
|
35 | + $headers = array( |
|
36 | + 'Accept' => 'application/json', |
|
37 | + 'Authorization' => $this->secret |
|
38 | + ); |
|
39 | 39 | |
40 | 40 | $body = json_encode($params); |
41 | 41 | |
@@ -75,8 +75,8 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function getUsers() |
77 | 77 | { |
78 | - $endpoint = '/users'; |
|
79 | - return $this->doRequest('get',$endpoint); |
|
78 | + $endpoint = '/users'; |
|
79 | + return $this->doRequest('get',$endpoint); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | |
@@ -137,12 +137,12 @@ discard block |
||
137 | 137 | return $this->doRequest('put', $endpoint, compact('username', 'password','name','email', 'groups')); |
138 | 138 | } |
139 | 139 | |
140 | - /** |
|
141 | - * locks/Disables an OpenFire user |
|
142 | - * |
|
143 | - * @param string $username Username |
|
144 | - * @return json|false Json with data or error, or False when something went fully wrong |
|
145 | - */ |
|
140 | + /** |
|
141 | + * locks/Disables an OpenFire user |
|
142 | + * |
|
143 | + * @param string $username Username |
|
144 | + * @return json|false Json with data or error, or False when something went fully wrong |
|
145 | + */ |
|
146 | 146 | public function lockoutUser($username) |
147 | 147 | { |
148 | 148 | $endpoint = '/lockouts/'.$username; |