compatible compatibility not specified not compatible
Version:
Added: 05.08.10
Updated: 11.08.10
Tags: deeemm, free, modifications
Demo:
License:
If you would like to automatically apply membership levels to new members, then this mod is for you.
This can also be useful when wanting to differentiate between different member groups - ie - making all female members of a female only member group. Both methods are shown below.
in profile_activate.php
Find
//Promotional membership
if ( getParam('enable_promotion_membership') == 'on' )
{
$memership_days = getParam('promotion_membership_days');
setMembership( $p_arr['Couple'], MEMBERSHIP_ID_PROMOTION, $memership_days, true );
}
}
add underneath
setMembership( $p_arr['ID'], MEMBERSHIP_GROUP_ID, 0, true );
Change MEMBERSHIP_GROUP_ID to the ID of the group you want members to automatically become a member of.
If you wish to target a specific type of member - for example females, then you need to determine which type the new member belongs to. In this case instead of the code above, use the following code instead.
if ($p_arr['Sex'] == 'female') {
setMembership( $p_arr['ID'], FEMALE_MEMBERSHIP_ID, 0, true )
}
Simply change $p_arr['Sex'] to whatever profile field you wish to check for, this also includes any custom profile fields that you have added.
/DM
Please Note:
Thank you so much for this modification and tutorial at the same time!
Its a real pitty that people take it and not even leave a review. I guess most people never change and live their entire life in greed!
Thanks :-)
www.DeeEmm.com