AnonymousUser doesn't exist

#1

Accidently deleted all users with Member.removeAll() from the dev console. Now whatever I type I get the following error:

Error: User AnonymousUser doesn't exist!

How I can fix this?

0 Likes

#2

Member.removeAll() removed not just the Users, but all the AdminGroups and Roles (except the system ones). You effectively wiped out all the access control data. Only way to recover is to restore from the latest db backup. But I am assuming you did this in your local environment, if so you will need to reset the postgres db and re-provision.

0 Likes