aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-03-15 20:55:17 +0100
committerJoas Schilling <nickvergessen@gmx.de>2012-08-01 10:17:05 +0200
commit77845c147818b4199005363a3168bbb44dc46641 (patch)
treef4d0c803bc7dc89528d919f868c7b21840b00c77 /phpBB/includes/functions_user.php
parenteda9bcc65de97b9ffb2c432756907ff0411b281f (diff)
downloadforums-77845c147818b4199005363a3168bbb44dc46641.tar
forums-77845c147818b4199005363a3168bbb44dc46641.tar.gz
forums-77845c147818b4199005363a3168bbb44dc46641.tar.bz2
forums-77845c147818b4199005363a3168bbb44dc46641.tar.xz
forums-77845c147818b4199005363a3168bbb44dc46641.zip
[feature/events] Adding ledge user_update_name
Used by phpBB Gallery PHPBB3-9550
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 6e658b4ef4..b50dcac49c 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -112,7 +112,7 @@ function update_last_username()
*/
function user_update_name($old_name, $new_name)
{
- global $config, $db, $cache;
+ global $config, $db, $cache, $phpbb_dispatcher;
$update_ary = array(
FORUMS_TABLE => array('forum_last_poster_name'),
@@ -137,6 +137,11 @@ function user_update_name($old_name, $new_name)
set_config('newest_username', $new_name, true);
}
+ $vars = array('old_name', 'new_name');
+ $event = new phpbb_event_data(compact($vars));
+ $phpbb_dispatcher->dispatch('core.user_update_name', $event);
+ extract($event->get_data_filtered($vars));
+
// Because some tables/caches use username-specific data we need to purge this here.
$cache->destroy('sql', MODERATOR_CACHE_TABLE);
}