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

Commit b27921d

Browse files
committed
Use setter method to save Northstar field.
1 parent 4a655c7 commit b27921d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/modules/dosomething/dosomething_northstar/dosomething_northstar.module

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ function dosomething_northstar_verify_user($credentials) {
7979
*/
8080
function dosomething_northstar_save_id_field($user, $northstar_response) {
8181
$northstar_id = !empty($northstar_response->data->id) ? $northstar_response->data->id : 'NONE';
82-
user_save($user, ['field_northstar_id' => [LANGUAGE_NONE => [0 => ['value' => $northstar_id]]]]);
82+
83+
$edit = [];
84+
dosomething_user_set_fields($edit, ['northstar_id' => $northstar_id]);
85+
user_save($user, $edit);
8386
}
8487

8588
/**

0 commit comments

Comments
 (0)