1 | <?php |
---|
2 | /* |
---|
3 | Plugin Name: Register FluxBB |
---|
4 | Version: auto |
---|
5 | Description: Link user registration from Piwigo to FluxBB forum (registration, password changing, deletion) |
---|
6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=252 |
---|
7 | Author: Eric |
---|
8 | Author URI: http://www.infernoweb.net |
---|
9 | */ |
---|
10 | |
---|
11 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
12 | |
---|
13 | if (!defined('REGFLUXBB_PATH')) define('REGFLUXBB_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); |
---|
14 | |
---|
15 | include_once (REGFLUXBB_PATH.'include/constants.php'); |
---|
16 | include_once (REGFLUXBB_PATH.'include/functions.inc.php'); |
---|
17 | |
---|
18 | load_language('plugin.lang', REGFLUXBB_PATH); |
---|
19 | |
---|
20 | /* plugin administration */ |
---|
21 | add_event_handler('get_admin_plugin_menu_links', 'Register_FluxBB_admin_menu'); |
---|
22 | |
---|
23 | |
---|
24 | /* user creation*/ |
---|
25 | add_event_handler('register_user', 'Register_FluxBB_Adduser'); |
---|
26 | |
---|
27 | |
---|
28 | // Check users registration |
---|
29 | add_event_handler('register_user_check', 'Register_FluxBB_RegistrationCheck', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); |
---|
30 | |
---|
31 | |
---|
32 | /* user deletion */ |
---|
33 | add_event_handler('delete_user', 'Register_FluxBB_Deluser'); |
---|
34 | |
---|
35 | // Redirection to profile page |
---|
36 | // --------------------------- |
---|
37 | add_event_handler('login_success', 'Register_FluxBB_Login'); |
---|
38 | |
---|
39 | /* Profile management */ |
---|
40 | if (script_basename() == 'profile') |
---|
41 | { |
---|
42 | add_event_handler('loc_begin_profile', 'Register_FluxBB_InitProfile', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); |
---|
43 | } |
---|
44 | |
---|
45 | /* Password forget */ |
---|
46 | add_event_handler('loc_begin_password', 'Register_FluxBB_PasswReset'); |
---|
47 | |
---|
48 | /* Access validation in FluxBB when validated in Piwigo through UAM plugin */ |
---|
49 | add_event_handler('login_success', 'UAM_Bridge', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); |
---|
50 | |
---|
51 | ?> |
---|