def is_username_valid(name): """ Service layer for checking if a given UserName is unique or not. """ users_no = dao.count_users_for_name(name) if users_no > 0: return False return True
def is_username_valid(name): """ Service layer for checking if a given UserName is unique or not. """ users_no = dao.count_users_for_name(name) if users_no > 0: return False return True