function action_VerifyNewAccount() { $account_id = $_GET['id']; $account = AccountService::GetById($account_id); if (isset($account)) { $account->isapproved = true; AccountService::Save($account); $user = new User(); $user->user_id = $account->account_id; $user->user_name = $account->account_name; UserService::Save($user); header("Location: /main"); } }