1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 03:54:10 +01:00

[feature/php-events] Fix docs and naming of core.update_username

PHPBB3-9550
This commit is contained in:
Joas Schilling 2012-07-28 16:53:20 +02:00
parent 0ebe1f8764
commit c903b1512c

View File

@ -137,8 +137,16 @@ function user_update_name($old_name, $new_name)
set_config('newest_username', $new_name, true);
}
/**
* Update username when it is changed
*
* @event core.update_username
* @var string old_name The old username that is replaced
* @var string new_name The new username
* @since 3.1-A1
*/
$vars = array('old_name', 'new_name');
extract($phpbb_dispatcher->trigger_event('core.user_update_name', compact($vars)));
extract($phpbb_dispatcher->trigger_event('core.update_username', compact($vars)));
// Because some tables/caches use username-specific data we need to purge this here.
$cache->destroy('sql', MODERATOR_CACHE_TABLE);