$name, 'URL' => get_root_url().'admin.php?page=plugin-'.basename(LCAS_PATH) ) ); return $menu; } // Check users identification // Define prefilter to add tooltips on register page add_event_handler('init', 'LCAS_InitPage'); // For page password.php, modifies $POST['username_or_email'] with registered // username, if this username is found in the DB with current rules of LCAS. add_event_handler('loc_begin_password', 'LCAS_InitPage'); function LCAS_InitPage() { global $template, $conf, $lang; $conf_LCAS = unserialize($conf['LoginCaseAccentsSensitivity']); // Set $conf['insensitive_case_logon'] to false, as LCAS takes completely // in charge everything concerning the case and the accents in the login if ($conf_LCAS[0] != '0') $conf['insensitive_case_logon'] = false; $p = ''; switch (script_basename()) { case 'register': $template->assign(array( 'LCAS_username_tooltip' => $lang['LCAS_tooltip_username_register'][intval($conf_LCAS[0])], 'LCAS_password_tooltip' => $lang['LCAS_tooltip_password_register'], )); $template->set_prefilter('register', 'LCAS_add_tooltips_prefilter_register'); break; case 'identification': $p = 'username'; $template->assign(array( 'LCAS_username_tooltip' => $lang['LCAS_tooltip_username_register'][intval($conf_LCAS[0])], 'LCAS_password_tooltip' => $lang['LCAS_tooltip_password_register'], )); $template->set_prefilter('identification', 'LCAS_add_tooltips_prefilter_identification'); break; case 'password': $p = 'username_or_email'; $template->assign(array( 'LCAS_username_tooltip' => $lang['LCAS_tooltip_username_register'][intval($conf_LCAS[0])], )); $template->set_prefilter('password', 'LCAS_add_tooltips_prefilter_password'); break; default: return false; } if (($p != '') and isset($_POST[$p]) and isset($conf_LCAS[0])) { $new_username = LCAS_SearchCaseUsername($_POST[$p],$conf_LCAS[0]); $_POST[$p] = $new_username == '' ? $_POST[$p] : $new_username; } } function LCAS_add_tooltips_prefilter_password($content, &$smarty) { $search = '