aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjaviexin <javiexin@gmail.com>2017-08-06 14:22:57 +0200
committerjaviexin <javiexin@gmail.com>2017-08-06 14:22:57 +0200
commitb6cb353239b00ad08e76594973035283afc9afb1 (patch)
tree30ca498b3bc97916109c450ff888f18554433605
parenta53c8cee79af4fc76590073ae5913d8159b97679 (diff)
downloadforums-b6cb353239b00ad08e76594973035283afc9afb1.tar
forums-b6cb353239b00ad08e76594973035283afc9afb1.tar.gz
forums-b6cb353239b00ad08e76594973035283afc9afb1.tar.bz2
forums-b6cb353239b00ad08e76594973035283afc9afb1.tar.xz
forums-b6cb353239b00ad08e76594973035283afc9afb1.zip
[ticket/15307] Extensions may add modes to acp_users
Includes both PHP and Template events. PHPBB3-15307
-rw-r--r--phpBB/adm/style/acp_users.html4
-rw-r--r--phpBB/docs/events.md7
-rw-r--r--phpBB/includes/acp/acp_users.php16
3 files changed, 27 insertions, 0 deletions
diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html
index 18c3d84f96..50b6ec9bc9 100644
--- a/phpBB/adm/style/acp_users.html
+++ b/phpBB/adm/style/acp_users.html
@@ -231,6 +231,10 @@
<!-- INCLUDE permission_mask.html -->
+<!-- ELSE -->
+
+ <!-- EVENT acp_users_mode_add -->
+
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md
index 8bece6465e..2b18d3e3d3 100644
--- a/phpBB/docs/events.md
+++ b/phpBB/docs/events.md
@@ -498,6 +498,13 @@ acp_styles_list_before
* Since: 3.1.7-RC1
* Purpose: Add content before list of styles
+acp_users_mode_add
+===
+* Locations:
+ + adm/style/acp_users.html
+* Since: 3.2.2-RC1
+* Purpose: Add extra modes to the ACP user page
+
acp_users_profile_before
===
* Locations:
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 5a2b1445dc..cf442bbc33 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -2576,6 +2576,22 @@ class acp_users
break;
+ default:
+
+ /**
+ * Additional modes provided by extensions
+ *
+ * @event core.acp_users_mode_add
+ * @var string mode New mode
+ * @var int user_id User id of the user to manage
+ * @var array user_row Array with user data
+ * @var array error Array with errors data
+ * @since 3.2.2-RC1
+ */
+ $vars = array('mode', 'user_id', 'user_row', 'error');
+ extract($phpbb_dispatcher->trigger_event('core.acp_users_mode_add', compact($vars)));
+
+ break;
}
// Assign general variables