[25028] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | Plugin Name: Password Policy |
---|
[25089] | 4 | Version: auto |
---|
[25028] | 5 | Description: Renforcer la sécurité des mots de passe - Enforce password security |
---|
[25090] | 6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=718 |
---|
[25028] | 7 | Author: Eric |
---|
| 8 | Author URI: http://www.infernoweb.net |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | /* History: PP_PATH.'Changelog.txt.php' */ |
---|
| 12 | |
---|
| 13 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 14 | if (!defined('PP_PATH')) define('PP_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); |
---|
| 15 | |
---|
| 16 | global $conf; |
---|
| 17 | |
---|
| 18 | include_once (PP_PATH.'include/functions.inc.php'); |
---|
| 19 | |
---|
| 20 | load_language('plugin.lang', PP_PATH); |
---|
[25089] | 21 | |
---|
[25028] | 22 | $conf_PP = unserialize($conf['PasswordPolicy']); |
---|
| 23 | |
---|
| 24 | |
---|
| 25 | // Plugin administration panel |
---|
| 26 | // --------------------------- |
---|
| 27 | add_event_handler('get_admin_plugin_menu_links', 'PP_admin_menu'); |
---|
| 28 | |
---|
[25104] | 29 | // Display messages on index page |
---|
| 30 | // ------------------------------ |
---|
| 31 | add_event_handler('init', 'PP_InitPage'); |
---|
| 32 | |
---|
[25028] | 33 | // Features and controls on user connexion |
---|
| 34 | // --------------------------------------- |
---|
| 35 | add_event_handler('loc_begin_index', 'PP_Init'); |
---|
| 36 | |
---|
| 37 | // Check users registration |
---|
| 38 | // ------------------------ |
---|
| 39 | add_event_handler('register_user_check', 'PP_RegistrationCheck', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); |
---|
| 40 | |
---|
| 41 | if (script_basename() == 'profile') |
---|
| 42 | { |
---|
| 43 | add_event_handler('loc_begin_profile', 'PP_Profile_Init'); |
---|
| 44 | } |
---|
| 45 | |
---|
[25089] | 46 | // Security option : Count of login failure and lock account after x attempt |
---|
| 47 | // ------------------------------------------------------------------------- |
---|
| 48 | add_event_handler('login_failure', 'PP_log_fail'); |
---|
| 49 | |
---|
[25028] | 50 | ?> |
---|