コード例 #1
0
ファイル: save.php プロジェクト: krillo/motiomera
     $foretagIdFrom = $_POST['foretagid_from'];
     $foretagIdTo = $_POST['foretagid_to'];
     if ($foretagIdFrom > 0 && $foretagIdTo > 0) {
         $status = Foretag::mergeOrderNycklar($foretagIdFrom, $foretagIdTo);
         $urlHandler->redirect("MergeOrder", "URL_ADMIN_MERGE", $status);
     } else {
         $urlHandler->redirect("MergeOrder", "URL_ADMIN_MERGE", "missing_params");
     }
     break;
 case "medlem":
     $passmsg = '';
     $medlem = Medlem::loadById($_POST["medlem_id"]);
     //probably not used any more - krillo 2010-07-29
     if (!empty($_POST['sendPassword'])) {
         try {
             Medlem::nyttLosen($medlem->getEpost());
         } catch (MedlemException $e) {
             if ($e->getCode() == -17) {
                 throw new UserException("Felaktig e-postadress", "E-postadressen är inte knuten till något konto.");
             }
         }
         throw new UserException("Lösenord skickat", "Ett nytt lösenord har skapats och skickats");
     }
     //this is the new way for admin password changes - krillo 2010-07-29
     $passwd = $_POST['newpassword'];
     if (!empty($passwd)) {
         $medlem->newPassword($_POST['newpassword']);
         $passmsg = rawurlencode('Ändrat till: ' . $_POST['newpassword']);
     }
     if (isset($_POST["aktivera"])) {
         $medlem->setEpostBekraftad(1);
コード例 #2
0
ファイル: nyttlosen.php プロジェクト: krillo/motiomera
<?php

include $_SERVER["DOCUMENT_ROOT"] . "/php/init.php";
try {
    Medlem::nyttLosen($_POST["epost"]);
} catch (MedlemException $e) {
    if ($e->getCode() == -17) {
        throw new UserException("Felaktig e-postadress", "E-postadressen är inte knuten till något konto.");
    }
}
throw new UserException("Lösenord skickat", "Ett nytt lösenord har skapats och skickats till den angivna e-postadressen.");