Пример #1
0
    }
    echoRespnse(200, $response);
});
$app->post('/SifremiUnuttum', function () use($app) {
    $response = array();
    $db = new DbHandler();
    $Mail = Decrypt($app->request->post('Email'));
    if (isset($Mail)) {
        $ResetKey = CreateRestKey($Mail);
        $sonuc = $db->SifirlamaKeyiGuncelle($Mail, $ResetKey);
        if ($sonuc == false) {
            $response["Sonuc"] = false;
            $response["Mesaj"] = "Bu mail adresine ait bir kullanıcı bulunamadı.";
        } else {
            $kullanici = $db->KullaniciGetir($Mail);
            if (SifirlamaMailGonder($Mail, $kullanici->AdiSoyadi, md5(base64_encode($ResetKey)))) {
                $response["Sonuc"] = true;
                $response["Mesaj"] = "Belirtilen Mail adresine sıfırlama talimatlarını gönderdik.";
            } else {
                $db->SifirlamaKeyiGuncelle($Mail, "");
                $response["Sonuc"] = false;
                $response["Mesaj"] = "Şifre sıfırlanırken bir hata oluştu.";
            }
        }
    } else {
        $response["Mesaj"] = "Geçersiz Değerler.";
        $response["Sonuc"] = false;
    }
    echoRespnse(200, $response);
});
$app->post('/ResimGuncelle', function () use($app) {
Пример #2
0
        $response["Mesaj"] = "Geçersiz Üyelik Bilgileri";
    }
    echoRespnse(200, $response);
});
$app->post('/SifremiUnuttum', function () use($app) {
    $response = array();
    $db = new DbHandler();
    $Mail = $app->request->post('Email');
    if (isset($Mail)) {
        $ResetKey = CreateRestKey($Mail);
        $sonuc = $db->SifirlamaKeyiGuncelle($Mail, $ResetKey);
        if ($sonuc == false) {
            $response["Sonuc"] = false;
            $response["Mesaj"] = "Bu mail adresine ait bir kullanıcı bulunamadı.";
        } else {
            if (SifirlamaMailGonder($Mail, 'Deneme', md5(base64_encode($ResetKey)))) {
                $response["Sonuc"] = true;
                $response["Mesaj"] = "Belirtilen Mail adresine sıfırlama talimatlarını gönderdik.";
            } else {
                $db->SifirlamaKeyiGuncelle($Mail, "");
                $response["Sonuc"] = false;
                $response["Mesaj"] = "Şifre sıfırlanırken bir hata oluştu.";
            }
        }
    } else {
        $response["Mesaj"] = "Geçersiz Değerler.";
        $response["Sonuc"] = false;
    }
    echoRespnse(200, $response);
});
$app->post('/ResimGuncelle', function () use($app) {