Hi,
i’m wondering if something recently changed to make my code stop working…
I was using:
//demote user
update_user_option ($user_id, “s2member_access_level”, 0);
and
//promote user
update_user_option ($user_id, “s2member_access_level”, 1);
to promote and demote users, however the promote to level 1 code no longer works. since a couple of weeks.
Is this still a valid way to do this, or do i need to update my code to use:
$user_id = $user_id;
$user = new WP_User($user_id);
$user->set_role(“s2member_level1”);
and if so how do I update the following to get a number based upon the s2member_access_level:
$s2member_var = get_user_field (“s2member_access_level”, $sub_id);
Thanks for any replies!