Exemplo n.º 1
0
        exit;
    }
    Ut::redirectTo(Ut::uri('home'), array('Your account was confirmed. Please login'), 'success');
    exit;
} elseif ($route->match('password', null)) {
    //Ut::authRequired();
    $view->view = 'password';
} elseif ($route->match('password/post', 2)) {
    if (!$_POST) {
        Ut::redirectTo(Ut::uri('report'), array('404 Page not found'));
        exit;
    }
    // Prepare and sanitize post input
    $api->setInputs($_POST);
    // Create new token
    $api->passwordToken();
    if ($api->getErrors()) {
        Ut::redirectTo(Ut::uri('password'), $api->getErrors());
        exit;
    }
    Ut::redirectTo(Ut::uri('report'), array('Your password request was created.Please check your email and confirm the password request'), 'success');
} elseif ($route->match('passwordnew', 1)) {
    $api->setInputs(array('token' => $route->getParam(0)));
    $api->passwordConfirm();
    if ($api->getErrors()) {
        Ut::redirectTo(Ut::uri('report'), $api->getErrors());
        exit;
    }
    $view->view = 'passwordnew';
} elseif ($route->match('passwordupdate', null)) {
    // Check post