And a custom set_include_path() for #450

This commit is contained in:
the-djmaze 2022-11-15 11:56:30 +01:00
parent 591955af1d
commit 901e45d672

View file

@ -33,6 +33,7 @@ class LoginOAuth2Plugin extends \RainLoop\Plugins\AbstractPlugin
// $this->addHook('sieve.after-login', array($this, $oSieveClient, $oSettings)); // $this->addHook('sieve.after-login', array($this, $oSieveClient, $oSettings));
$this->addHook('filter.account', 'filterAccount'); $this->addHook('filter.account', 'filterAccount');
// set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__);
spl_autoload_register(function($classname){ spl_autoload_register(function($classname){
if (str_starts_with($classname, 'OAuth2\\')) { if (str_starts_with($classname, 'OAuth2\\')) {
include_once __DIR__ . strtr("\\{$sClassName}", '\\', DIRECTORY_SEPARATOR) . '.php'; include_once __DIR__ . strtr("\\{$sClassName}", '\\', DIRECTORY_SEPARATOR) . '.php';