Fix class not found.

This commit is contained in:
James Cole 2021-10-23 09:37:53 +02:00
parent 898a517ae9
commit ba740322f4
No known key found for this signature in database
GPG Key ID: BDE6667570EADBD5

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
);
}
}
}