@@ -181,17 +181,13 @@ |
||
181 | 181 | |
182 | 182 | if($platform->loggedIn()) { |
183 | 183 | return $platform; |
184 | - } |
|
185 | - |
|
186 | - else { |
|
184 | + } else { |
|
187 | 185 | print 'The Username is : ' . $this->config->get('GLIP_USERNAME'); |
188 | 186 | $refresh = $platform->login($this->config->get('GLIP_USERNAME'), $this->config->get('GLIP_EXTENSION'), $this->config->get('GLIP_PASSWORD')); |
189 | 187 | file_put_contents($file, json_encode($refresh->jsonArray(), JSON_PRETTY_PRINT)); |
190 | 188 | return $platform; |
191 | 189 | } |
192 | - } |
|
193 | - |
|
194 | - catch (Exception $e) { |
|
190 | + } catch (Exception $e) { |
|
195 | 191 | $platform->login($this->config->get('GLIP_USERNAME'), $this->config->get('GLIP_EXTENSION'), $this->config->get('GLIP_PASSWORD')); |
196 | 192 | file_put_contents($file, json_encode($platform->auth()->data(), JSON_PRETTY_PRINT)); |
197 | 193 | return $platform; |