function auth() { $folder = NextendRequest::getVar('folder'); if ($folder) { $authfile = NextendFilesystem::pathToAbsolutePath($folder) . 'auth.php'; if (NextendFilesystem::fileexists($authfile)) { require_once $authfile; if (function_exists('nextend_api_auth_flow')) { nextend_api_auth_flow(); } } } exit; }