Skip to content
This repository was archived by the owner on Oct 29, 2020. It is now read-only.

Commit 3f86eb6

Browse files
committed
Remove commented code.
1 parent 71c70e8 commit 3f86eb6

File tree

1 file changed

+0
-50
lines changed

1 file changed

+0
-50
lines changed

lib/modules/dosomething/dosomething_northstar/dosomething_northstar.module

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,6 @@ function dosomething_northstar_register_user($form_state) {
8989
global $user;
9090
// Build a user that Northstar expects.
9191
$ns_user = dosomething_northstar_build_ns_user($user, $form_state);
92-
// Send that to NS.
93-
// $northstar = new Northstar();
94-
// try {
95-
// $response = $northstar->updateUser($ns_user);
96-
// if ($response->getStatusCode() === '200' && module_exists('stathat')) {
97-
// stathat_send_ez_count('drupal - Northstar - user migrated - count', 1);
98-
// }
99-
// }
100-
// catch (Exception $e) {
101-
102-
// watchdog('dosomething_northstar', 'User not migrated : ' . $e, NULL, WATCHDOG_ERROR);
103-
// }
10492
$client = _dosomething_northstar_build_http_client();
10593
$response = drupal_http_request($client['base_url'] . '/users', array(
10694
'headers' => $client['headers'],
@@ -293,43 +281,5 @@ function dosomething_northstar_build_ns_user($user, $form_state) {
293281
}
294282

295283

296-
class Northstar {
297-
298-
// protected $client;
299-
300-
// public function __construct() {
301-
302-
// $base_url = NORTHSTAR_URL;
303-
// if (getenv('DS_ENVIRONMENT') === 'local') {
304-
// $base_url .= ":" . NORTHSTAR_PORT;
305-
// }
306-
// $version = NORTHSTAR_VERSION;
307-
308-
// if (libraries_load('guzzle') == TRUE) {
309-
// $client = new GuzzleHttp\Client(array(
310-
// 'base_url' => array($base_url . '/{version}/', array('version' => $version)),
311-
// 'defaults' => array(
312-
// 'headers' => array(
313-
// 'X-DS-Application-Id' => NORTHSTAR_APP_ID,
314-
// 'X-DS-REST-API-Key' => NORTHSTAR_APP_KEY,
315-
// 'Content-Type' => 'application/json',
316-
// 'Accept' => 'application/json'
317-
// ),
318-
// ),
319-
// ));
320-
// $this->client = $client;
321-
322-
// }
323-
// }
324-
325-
// public function updateUser($user) {
326-
// // return $this->client->getUrl();
327-
// $response = $this->client->post('users', array(
328-
// 'body' => json_encode($user),
329-
// ));
330-
331-
// // watchdog('dosomething_northstar', 'full url' . $response->getUrl(), NULL, WATCHDOG_ERROR);
332-
// return $response;
333-
// }
334284

335285
}

0 commit comments

Comments
 (0)