The code already checks that userid is empty, so why the else?