@@ -172,27 +172,27 @@ function dosomething_northstar_update_user($form_state) {
172172 * @param int $drupal_id Drupal user id.
173173 * @return object
174174 */
175- function dosomething_northstar_get_northstar_user($id ) {
176- $northstar_user_info = cache_get('northstar_user_info_' . $id , 'cache_dosomething_northstar');
175+ function dosomething_northstar_get_northstar_user($drupal_id ) {
176+ $northstar_user_info = cache_get('northstar_user_info_' . $drupal_id , 'cache_dosomething_northstar');
177177
178178 if ($northstar_user_info) {
179179 $northstar_user_info = $northstar_user_info->data;
180180 }
181181 else {
182182 $client = _dosomething_northstar_build_http_client();
183183
184- $northstar_user_info = drupal_http_request($client['base_url'] . '/users/drupal_id/' . $id , array(
184+ $northstar_user_info = drupal_http_request($client['base_url'] . '/users/drupal_id/' . $drupal_id , array(
185185 'headers' => $client['headers'],
186186 'method' => 'GET',
187187 ));
188188
189189 $northstar_user_info = $northstar_user_info->data;
190190
191191 if (!empty($northstar_user_info->error)) {
192- $error = sprintf("Error fetching Northstar user data, uid=%d: '%s'", $id , $northstar_user_info->error);
192+ $error = sprintf("Error fetching Northstar user data, uid=%d: '%s'", $drupal_id , $northstar_user_info->error);
193193 watchdog_exception('northstar', new Exception($error));
194194 } else {
195- cache_set('northstar_user_info_' . $id , $northstar_user_info, 'cache_dosomething_northstar', REQUEST_TIME + 60*60*24);
195+ cache_set('northstar_user_info_' . $drupal_id , $northstar_user_info, 'cache_dosomething_northstar', REQUEST_TIME + 60*60*24);
196196 }
197197 }
198198
0 commit comments