Fix class not found.

This commit is contained in:
James Cole
2021-10-23 09:37:53 +02:00
parent 898a517ae9
commit ba740322f4

View File

@@ -68,10 +68,11 @@ class AuthServiceProvider extends ServiceProvider
Passport::routes();
Passport::tokensExpireIn(now()->addDays(14));
\LdapRecord\Models\OpenLDAP\User::addGlobalScope(
new UserDefinedScope
);
if (class_exists(\LdapRecord\Models\OpenLDAP\User::class)) {
\LdapRecord\Models\OpenLDAP\User::addGlobalScope(
new UserDefinedScope
);
}
}
}