mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/php-events] Fix docs and naming of core.update_username
PHPBB3-9550
This commit is contained in:
parent
0ebe1f8764
commit
c903b1512c
1 changed files with 9 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue