register_hook('HTML_LOGINFORM_OUTPUT', 'AFTER', $this, 'handle_html_loginform_output'); $controller->register_hook('AUTH_LOGIN_CHECK', 'AFTER', $this, 'handle_login'); } public function handle_html_loginform_output(Doku_Event &$event, $param) { global $auth; if(!($auth instanceof auth_plugin_sfauth)) { return; } $this->displayLogin(); } /** * Displays the Salesforce Login Button * * Note: We always use the main instance to start the oauth workflow because it doesn't matter. Salesforce * will use the redirect URI configured in the instance of the user that logged in and that will contain the * correct instance number for all subsequent API calls. this way we only need one login button */ protected function displayLogin() { global $ID; echo '