Location: PHPKode > scripts > WebsiteMemberManager > members-section/members/php/add-new-member.php
<?php
if (!isset($_POST['email']))
{
 Header("Location: ./");
 exit;
}
include("member-class.php");
$dbc = dbc::instance();
if (!isset($duration)) $duration=0;//where PayPal is not used
// check account type - auto or manual activation?
$result = $dbc->prepare("select * from wmm_admin");
$rows = $dbc->executeGetRows($result);
$row=$rows[0];
$auto_activate = $row['auto_activate'];
$contact_email = $row['contact_email'];
$result = $dbc->prepare("select id from wmm_members where their_username=:email OR email=:email ");
$result->bindParam(':email', $email, PDO::PARAM_STR);
$rows = $dbc->executeGetRows($result);
if (count($rows)>0)//email address already registered
{
 if (paypal_enabled())
 {
  $id=$rows[0]['id'];
  include("paypal_renewal.php");//continue with registration
 }
 else
 {
  include("header.html");
  $feedback->setShow("Your email address is already registered with us. Please wait for your account to be enabled.<br><br>Our administrator will activate your account soon.<br>If you think there has been an error with your original registration please contact us.","NOTICE",0,"member");
  include("login.html");
  include("footer.html");
 }
 exit;
}
//new member - continue and add to db
$member= new WMMmembers();
$id=$member->create($auto_activate,$_POST);

include("header.html");
if (paypal_enabled())
{
 include("paypal-logos.html");
 include("paypalform.html");
 include("footer.html");
 exit;
}
if ($auto_activate==1)
{
 echo AUTO_ACTIVATE_MSG;
 include("__email_login_details.php");
}
else
{
 echo MANUAL_ACTIVATION_MSG;
 include("__email_admin_new_member.php");
}
include("footer.html");
?>
Return current item: WebsiteMemberManager