[3742] | 1 | <?php |
---|
| 2 | /* |
---|
[5181] | 3 | Plugin Name: UserAdvManager |
---|
[17507] | 4 | Version: auto |
---|
[4957] | 5 | Description: Renforcer la gestion des utilisateurs - Enforce users management |
---|
[9295] | 6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=216 |
---|
[3742] | 7 | Author: Nicco, Eric |
---|
| 8 | Author URI: http://gallery-nicco.no-ip.org, http://www.infernoweb.net |
---|
| 9 | */ |
---|
| 10 | |
---|
[5181] | 11 | /* History: UAM_PATH.'Changelog.txt.php' */ |
---|
[3742] | 12 | |
---|
| 13 | /* |
---|
| 14 | ***** TODO List ***** |
---|
[6783] | 15 | See project bugtracker: http://piwigo.org/bugs/my_view_page.php |
---|
[3742] | 16 | */ |
---|
| 17 | |
---|
[4927] | 18 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
[5181] | 19 | if (!defined('UAM_PATH')) define('UAM_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); |
---|
[3742] | 20 | |
---|
[9908] | 21 | global $conf; |
---|
| 22 | |
---|
[5181] | 23 | include_once (UAM_PATH.'include/constants.php'); |
---|
| 24 | include_once (UAM_PATH.'include/functions.inc.php'); |
---|
[3742] | 25 | |
---|
[5181] | 26 | load_language('plugin.lang', UAM_PATH); |
---|
[13285] | 27 | load_language('help.lang', UAM_PATH); |
---|
[9908] | 28 | $conf_UAM = unserialize($conf['UserAdvManager']); |
---|
[3858] | 29 | |
---|
| 30 | |
---|
[7955] | 31 | // Plugin administration panel |
---|
[12271] | 32 | // --------------------------- |
---|
[5056] | 33 | add_event_handler('get_admin_plugin_menu_links', 'UAM_admin_menu'); |
---|
[3742] | 34 | |
---|
[17889] | 35 | // Features and controls on user connexion |
---|
| 36 | // --------------------------------------- |
---|
| 37 | add_event_handler('loc_begin_index', 'UAM_Init'); |
---|
[3742] | 38 | |
---|
[7955] | 39 | // User creation |
---|
[12271] | 40 | // ------------- |
---|
[5056] | 41 | add_event_handler('register_user', 'UAM_Adduser'); |
---|
[3742] | 42 | |
---|
[7955] | 43 | // User deletion |
---|
[12271] | 44 | // ------------- |
---|
[5056] | 45 | add_event_handler('delete_user', 'UAM_Deluser'); |
---|
[3742] | 46 | |
---|
[6990] | 47 | // Check users registration |
---|
[12271] | 48 | // ------------------------ |
---|
[5056] | 49 | add_event_handler('register_user_check', 'UAM_RegistrationCheck', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); |
---|
[3742] | 50 | |
---|
[4124] | 51 | if (script_basename() == 'profile') |
---|
| 52 | { |
---|
[5056] | 53 | add_event_handler('loc_begin_profile', 'UAM_Profile_Init'); |
---|
[3742] | 54 | } |
---|
| 55 | |
---|
[7955] | 56 | // Redirection to profile page |
---|
[12271] | 57 | // --------------------------- |
---|
[23902] | 58 | add_event_handler('login_success', 'UAM_LoginTasks',EVENT_HANDLER_PRIORITY_NEUTRAL, 1); |
---|
[6775] | 59 | |
---|
[9135] | 60 | // Adding customized text to lost password email |
---|
[12271] | 61 | // --------------------------------------------- |
---|
[9135] | 62 | add_event_handler('render_lost_password_mail_content', 'UAM_lost_password_mail_content'); |
---|
[8065] | 63 | |
---|
[7955] | 64 | // *** Important ! This is necessary to make email exclusion work in admin's users management panel *** |
---|
[12271] | 65 | // ---------------------------------------------------------------------------------------------------- |
---|
[5056] | 66 | add_event_handler('init', 'UAM_InitPage'); |
---|
[4124] | 67 | |
---|
[17972] | 68 | |
---|
[9908] | 69 | // PWG_Stuffs module |
---|
[12271] | 70 | // ----------------- |
---|
[21075] | 71 | if (isset($conf_UAM['STUFFS']) and $conf_UAM['STUFFS'] == 'true') |
---|
[9908] | 72 | { |
---|
| 73 | add_event_handler('get_stuffs_modules', 'register_UAM_stuffs_module'); |
---|
| 74 | } |
---|
[12239] | 75 | |
---|
| 76 | |
---|
[17508] | 77 | // Check options compatibility between UAM and Piwigo at admin page load |
---|
[17507] | 78 | // --------------------------------------------------------------------- |
---|
| 79 | add_event_handler('loc_begin_admin_page', 'UAM_check_compat'); |
---|
[3742] | 80 | ?> |
---|