public static function register($data = []) { if (self::checkValues($data)) { UsersDB::insertCustomer($data); } else { self::registration(); } }
public static function addUser($data = []) { if (self::checkValues($data)) { $id = UsersDB::insertCustomer($data); self::addActionToDiary($_SESSION["id"], "Prodajalec z id-jem " . $_SESSION["id"] . " je dodal stranko z id-jem " . $id); echo ViewHelper::redirect(BASE_URL . "users"); } else { self::addUserForm(); } }