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

Commit 939b0bb

Browse files
committed
Rename id to drupal_id to make clearer.
Was ambiguous what kind of ID it was without reading implementation.
1 parent a7df8ff commit 939b0bb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/modules/dosomething/dosomething_northstar/dosomething_northstar.module

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)