コード例 #1
0
ファイル: login.php プロジェクト: Jayriq/mmslides
    if (!$userdata->lostPasswordForUserWithEmail($request['email'], $request['url'], $request['subject'], $request['body'])) {
        header("HTTP/1.1 200 OK");
        header("Content-Type: text/html");
        $data = array('error' => 12);
        echo json_encode($data);
        $ok = true;
    } else {
        header("HTTP/1.1 200 OK");
        header("Content-Type: text/html");
        $data = array('success' => 1);
        echo json_encode($data);
        $ok = true;
    }
} else {
    if (strcmp($request['cmd'], 'checkLostPassword') == 0) {
        if ($data = $userdata->getLostPasswordDataForSession($request['session'])) {
            header("HTTP/1.1 200 OK");
            header("Content-Type: text/html");
            echo json_encode($data);
            $ok = true;
        } else {
            header("HTTP/1.1 200 OK");
            header("Content-Type: text/html");
            $data = array('error' => 1);
            echo json_encode($data);
            $ok = true;
        }
    } else {
        if (strcmp($request['cmd'], 'changePassword') == 0) {
            if (strlen($request["id"]) && strlen($request["password"])) {
                if ($data = $userdata->changePassword($request['id'], $request['password'])) {