- This topic has 1 reply, 2 voices, and was last updated 12 years, 2 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eMember › eMember Bug Report – wp_emember_is_member_logged_in() checks only primary level
Hey there – using eStore and eMember in conjunction; adore these plugins. They are some of the most thoughtful and well-designed WP plugins I have ever used, and after developing 40-odd sites on WP I have used a lot!
One minor bug to report though. I am using primary and secondary membership levels to construct a VOD video player for members that varies what playlist items are available based on what the member has purchased. (I.e., there’s a membership level for each segment of the video, and they see the ones associated with the membership levels they have.) It works very nicely – except that the function wp_emember_is_member_logged_in(‘x’) doesn’t seem to check against the secondary membership levels. So if I have a member in level #2 as primary and #3 as secondary, wp_emember_is_member_logged_in(‘2’) returns true but wp_emember_is_member_logged_in(‘3’) returns false.
Not a big deal; I just wrote the following to fix:
function checksecondarylevel($querylevel) {
global $auth;
$ememberdata = get_object_vars($auth);
$secondarylevels = $ememberdata->secondary_membership_levels;
if(isset($secondarylevels)) {
foreach($secondarylevels as $level) {
if ($level->id == $querylevel) {
return true;
}
}
}
}
But it would be nice if this were built into the wp_emember_is_member_logged_in function!
Thanks again for a great set of plugins.
Thank you Paul. We will incorporate this into the “wp_emember_is_member_logged_in” function.