Beispiel #1
0
        $success = true;
        break;
    case 'GET':
        $mem = $member->validate_forgotten($_GET['id'], $_GET['key']);
        if (!$mem) {
        } else {
            $success = true;
        }
        break;
    case 'PUT':
        //Update information
        //---------------------
        $id = $_GET['id'];
        $key = $_GET['key'];
        $arr = array('id' => $id);
        $user = new \uVicate\User($arr);
        $edit = array();
        if (array_key_exists('password', $PUT)) {
            $validate = $member->complete_forgotten($id, $key);
            if ($validate !== false) {
                $edit['password'] = $PUT['password'];
                $mem = $user->edit($edit);
                $success = true;
            }
        }
        break;
}
if ($success === false) {
    header("HTTP/1.0 404 Not Found", TRUE, 404);
}
echo $mem;
Beispiel #2
0
                }
                $id = $_GET[$key];
                $usr = $user->getby_id($id, $param);
                $usr = $user->handleResponse($usr);
                $success = true;
                break;
            }
        }
        break;
    case 'PUT':
        //Update information
        //---------------------
        $id = $_GET['id'];
        $arr = array('id' => $id);
        $user = new \uVicate\User($arr);
        $usr = $user->edit($PUT);
        $success = true;
        break;
    case 'DELETE':
        $id = $_GET['id'];
        $arr = array('id' => $id);
        $user = new \uVicate\User($arr);
        $usr = $user->delete();
        $success = true;
        break;
    default:
        break;
}
if ($success === false) {
    header("HTTP/1.0 404 Not Found", TRUE, 404);
    //$usr = "******";