Graphene icon indicating copy to clipboard operation
Graphene copied to clipboard

All Users Fetched during Non-CAS Auth

Open timcortesi opened this issue 2 years ago • 0 comments

In Libraries/CustomAuth.php line 36, there is the following if statement:

if(!count(User::get())){

That is there to check to see if at least one user exists within Graphene.

If one user doesn't exist, it redirects you to the setup page, but what it's doing is attempting to fetch every single user from the database. When you have 100,000 users in the database, it runs out of memory and crashes

That should probably be changed to if(is_null(User::first())) or something similar.

timcortesi avatar Jun 06 '23 18:06 timcortesi