--- a/plugins/yubikey/auth.php Thu Feb 26 01:19:45 2009 -0500
+++ b/plugins/yubikey/auth.php Thu Feb 26 11:30:17 2009 -0500
@@ -1,5 +1,8 @@
<?php
+if ( getConfig('yubikey_enable', '1') != '1' )
+ return true;
+
// hook into auth
$plugins->attachHook('login_process_userdata_json', 'return yubikey_auth_hook_json($userinfo, $req["level"], @$req["remember"]);');
// hook into special page init
@@ -189,6 +192,9 @@
global $db, $session, $paths, $template, $plugins; // Common objects
global $lang;
+ if ( getConfig('yubikey_enable', '1') != '1' )
+ return true;
+
$paths->add_page(array(
'name' => $lang->get('yubiauth_specialpage_yubikey'),
'urlname' => 'Yubikey',
--- a/plugins/yubikey/corelib.php Thu Feb 26 01:19:45 2009 -0500
+++ b/plugins/yubikey/corelib.php Thu Feb 26 11:30:17 2009 -0500
@@ -172,6 +172,9 @@
function yubikey_attach_headers(&$template)
{
+ if ( getConfig('yubikey_enable', '1') != '1' )
+ return true;
+
$template->add_header('<script type="text/javascript" src="' . scriptPath . '/plugins/yubikey/yubikey.js"></script>');
$template->add_header('<link rel="stylesheet" type="text/css" href="' . scriptPath . '/plugins/yubikey/yubikey.css" />');
}
--- a/plugins/yubikey/usercp.php Thu Feb 26 01:19:45 2009 -0500
+++ b/plugins/yubikey/usercp.php Thu Feb 26 11:30:17 2009 -0500
@@ -1,5 +1,8 @@
<?php
+if ( getConfig('yubikey_enable', '1') != '1' )
+ return true;
+
$plugins->attachHook("userprefs_jbox", "yubikey_ucp_setup();");
$plugins->attachHook("userprefs_body", "return yubikey_user_cp(\$section);");
$plugins->attachHook("login_form_html", "yubikey_inject_html_login();");