Ut::redirectTo(Ut::uri('report'), array('404 Page not found')); } // Prepare and sanitize post input $api->setInputs($_POST); // Validation if (!Ut::isEmail($api->getInputVal('mail'))) { $api->setErrors('Invalid email address'); } if (!Ut::strLenght($api->getInputVal('pw'), 6)) { $api->setErrors('Password must be min 6 characters length'); } if ($api->getErrors()) { Ut::redirectWithValidation(Ut::uri('join'), $api->getErrors(), $api->getInputs()); exit; } $api->join(); if ($api->getErrors()) { Ut::redirectWithValidation(Ut::uri('join'), $api->getErrors(), $api->getInputs()); exit; } Ut::redirectTo(Ut::uri('report'), array('Your account was created. Please check your email and confirm the registration'), 'success'); exit; } elseif ($route->match('join/confirm', 2)) { $api->joinConfirm(strip_tags($route->getParam(0))); if ($api->getErrors()) { Ut::redirectTo(Ut::uri('report'), $api->getErrors()); exit; } Ut::redirectTo(Ut::uri('home'), array('Your account was confirmed. Please login'), 'success'); exit; } elseif ($route->match('password', null)) {