$Mailchimp_Lists->subscribe($mailchimp_list_id, array('email' => $email));
 mysqli_query($db, "\r\n\t\t\t\t\t\tINSERT INTO {$dbinfo[pre]}members_address  \r\n\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\tmember_id,\r\n\t\t\t\t\t\t\taddress,\r\n\t\t\t\t\t\t\taddress_2,\r\n\t\t\t\t\t\t\tcity,\r\n\t\t\t\t\t\t\tstate,\r\n\t\t\t\t\t\t\tpostal_code,\r\n\t\t\t\t\t\t\tcountry\r\n\t\t\t\t\t\t) \r\n\t\t\t\t\t\tVALUES \r\n\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t'{$saveID}',\r\n\t\t\t\t\t\t\t'{$address}',\r\n\t\t\t\t\t\t\t'{$address_2}',\r\n\t\t\t\t\t\t\t'{$city}',\r\n\t\t\t\t\t\t\t'{$state}',\r\n\t\t\t\t\t\t\t'{$postal_code}',\r\n\t\t\t\t\t\t\t'{$country}'\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t");
 // Save member address
 $signupGroups = explode(",", $config['settings']['signup_groups']);
 // Assign any signup groups
 if ($signupGroups) {
     foreach ($signupGroups as $key => $value) {
         mysqli_query($db, "INSERT INTO {$dbinfo[pre]}groupids (mgrarea,item_id,group_id) VALUES ('members','{$saveID}','{$value}')");
     }
 }
 //$_SESSION['testing']['step3'] = '3';
 try {
     $memberObj = new memberTools($saveID);
     $member = $memberObj->getMemberInfoFromDB($umem_id);
     // Get all the member info from the database
     $member['primaryAddress'] = $memberObj->getPrimaryAddress();
     if ($paidMembership) {
         // Do paid membership stuff
         // $saveID
         // $membershipDB
         $ubill_id = create_unique2();
         $invoice_number = $config['settings']['invoice_prefix'] . $config['settings']['invoice_next'] . $config['settings']['invoice_suffix'];
         // Get new invoice number
         $cur_inv = $config['settings']['invoice_next'];
         $next_inv = $cur_inv + 1;
         $billDate = $nowGMT;
         $dueDate = $nowGMT;
         $invoiceTotal = $membershipDB['price'];
         $membershipPeriodName = $lang[$membershipDB['period']];
         $invoiceMembershipName = "{$lang[membership]}: {$membershipDB[name]} ({$membershipPeriodName})";
         // Create bill record
Example #2
0
     // Assign member ID as memXXX to permissions
     if ($memberGroupsFixed) {
         foreach ($memberGroupsFixed as $groups) {
             $_SESSION['member']['permmissions'][] = $groups;
         }
     }
     $iplogin = $_SERVER['REMOTE_ADDR'];
     mysqli_query($db, "UPDATE {$dbinfo[pre]}members SET last_login = '******' WHERE mem_id = '{$loginMember[mem_id]}'");
     // Set the last login time and date
     mysqli_query($db, "UPDATE {$dbinfo[pre]}members SET ip_login = '******' WHERE mem_id = '{$loginMember[mem_id]}'");
     // Set the last login IP
     mysqli_query($db, "UPDATE {$dbinfo[pre]}orders SET member_id = '{$loginMember[mem_id]}' WHERE uorder_id = '{$_SESSION[uniqueOrderID]}'");
     // reassign any carts to this member
     mysqli_query($db, "UPDATE {$dbinfo[pre]}lightboxes SET member_id = '{$loginMember[mem_id]}', umember_id ='{$loginMember[umem_id]}', guest='0' WHERE umember_id = '{$loggedOutUMEMID}' AND guest = '1'");
     // Update guest lightboxes to this member
     $_SESSION['member']['primaryAddress'] = $memberSess->getPrimaryAddress();
     // Get the members primary address
     if ($config['settings']['tax_type'] == 0) {
         $_SESSION['tax'] = $memberSess->getMemberTaxValues();
     }
     $ratedMediaResult = mysqli_query($db, "SELECT member_id,media_id FROM {$dbinfo[pre]}media_ratings WHERE member_id = '{$loginMember[mem_id]}'");
     // Find out which media a member already rated
     while ($ratedMedia = mysqli_fetch_array($ratedMediaResult)) {
         $_SESSION['ratedMedia'][] = $ratedMedia['media_id'];
     }
     // Moved out of member session array so it can be handled separately and between logged in and not logged in visitors
     header("location: {$_SESSION[jumpToOnLogin]}");
     exit;
 } else {
     $logNotice = 'loginFailedMessage';
     // The session assign/login failed