# HG changeset patch
# User Dan
# Date 1235665817 18000
# Node ID d0fe7acaf0e87a491ac0bb2b1f0fddd878f032b4
# Parent 6edc6ebb3b39d4131ce04a6bf80dd0143ad58a57
Maybe we could actually make yubikey_enable in config not ignored!
diff -r 6edc6ebb3b39 -r d0fe7acaf0e8 plugins/yubikey/auth.php
--- 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 @@
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',
diff -r 6edc6ebb3b39 -r d0fe7acaf0e8 plugins/yubikey/corelib.php
--- 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('');
$template->add_header('');
}
diff -r 6edc6ebb3b39 -r d0fe7acaf0e8 plugins/yubikey/usercp.php
--- 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 @@
attachHook("userprefs_jbox", "yubikey_ucp_setup();");
$plugins->attachHook("userprefs_body", "return yubikey_user_cp(\$section);");
$plugins->attachHook("login_form_html", "yubikey_inject_html_login();");