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 if (!$_POST) { Ut::redirectTo(Ut::uri('report'), array('404 Page not found')); exit; } // Prepare and sanitize post input $api->setInputs($_POST); // Validation if (!Ut::strLenght($api->getInputVal('pw'), 6)) {