Skip to content

Instantly share code, notes, and snippets.

@jrxpress
Forked from borndangerous/amember
Created August 13, 2017 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrxpress/3fa910bf7cd62b592d0af8e1640abe25 to your computer and use it in GitHub Desktop.
Save jrxpress/3fa910bf7cd62b592d0af8e1640abe25 to your computer and use it in GitHub Desktop.
/* 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