Beispiel #1
0
        $m->confirm($_POST["losenord"]);
        $o = new Order("medlem", $m, $AS400Kampanjkod);
        $o->setMedlem($m);
        $o->gorUppslag();
        //this function sends header and breaks execution
        die;
    }
}
if (isset($_POST["inv"]) && isset($m) && isset($_POST["losenord"])) {
    //invited thru mail, no confirm
    $m->confirm($_POST["losenord"]);
    $m->commit();
    $m = Medlem::loadByEpost($_POST["epost"]);
    //to get medlem.id for Grupp::Settleinvite
    $m->sendWelcomeMail();
    Grupp::settleInvite($_POST["inv"], $m);
    throw new UserException("Välkommen till Motiomera!", "Ditt konto har nu skapats och du kan logga in uppe till höger.");
} elseif ($_POST["kontotyp"] == "trial" || $_POST["kontotyp"] == "" || $_POST["kontotyp"] == "foretagsnyckel") {
    /*if($_POST["kontotyp"] == "trial"){
    	if(Medlem::usedTrialKonto($_POST['epost']) == false){
    	$m->setUsedTrialKonto($_POST['epost']);
    	}else{
    	throw new UserException("Trial konto tid &auml;r f&ouml;rbrukat", "Du har redan anv&auml;nt din trial period, f&ouml;r att betala v&auml;ljer du ett betal alternativ h&auml;r: <a href=\"".$urlHandler->getUrl("Medlem", URL_CREATE)."\" title=\"Bli medlem\">Bli Medlem</a>");
    	}
    	}*/
    $m->confirm($_POST["losenord"]);
    if ($_POST["kontotyp"] == "foretagsnyckel") {
        $m->setForetagsnyckel_temp($_POST["foretagsnyckel"]);
        $m->commit();
    }
    $m->sendActivationEmail();