Skip to content

Instantly share code, notes, and snippets.

@jrxpress jrxpress/amember forked from borndangerous/amember
Created Aug 13, 2017

Embed
What would you like to do?
/* SAMPLE AMEMBER STUFF */
<?php
session_start();
// is user logged in?
$user = $_SESSION['_amember_user'];
if ($user['member_id'] > 0){
print "Hello $user[name_f] $user[name_l]<br>\n";
$need_one_from = array(3);
if (array_intersect($need_one_from, $_SESSION['_amember_product_ids'])){
// they're good. keep loading.
header( 'Location: http://www.getsourcecontrol.com/members/gatekeeper/tier3/tier3.php' ) ;
} else {
//sorry don't have the rights
header( 'Location: http://www.getsourcecontrol.com/member/member.php' ) ;
}
} else {
//print "You are not logged-in.<br>\n";
//Go to main login
header( 'Location: http://www.getsourcecontrol.com/member/member.php' ) ;
}
//header( 'Location: http://www.getsourcecontrol.com/members/index.php/Tier1' ) ;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.