Hi guys 😊
I’m trying to create a hidden member field to identify if members have paid their subscriptions. I’ve not been able to do it by creating a custom_field as members can change this in their profiles to say if they have paid or not.
As a work around, I’ve created an extra table called exp_member_subs
with two columns; member_id and subs_paid
When a new user registers, I want to create an entry into the exp_member_subs table to record that their subscription is not paid. The subs_paid column has a default value of ‘no’.
I’ve modified system/modules/member/mod.member_register.php
/** Insert basic member data */
$DB->query($DB->insert_string('exp_members', $data));
$member_id = $DB->insert_id;
/** Insert subs */
$DB->query($DB->insert_string('exp_member_subs', $member_id));It inserts the entry, but the member_id is always 0.
Any ideas?