mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/events] Adding ledges user_delete
Used by phpBB Gallery PHPBB3-9550
This commit is contained in:
parent
77845c1478
commit
5b226c4002
1 changed files with 6 additions and 1 deletions
|
@ -336,7 +336,7 @@ function user_add($user_row, $cp_data = false)
|
||||||
*/
|
*/
|
||||||
function user_delete($mode, $user_id, $post_username = false)
|
function user_delete($mode, $user_id, $post_username = false)
|
||||||
{
|
{
|
||||||
global $cache, $config, $db, $user, $auth;
|
global $cache, $config, $db, $user, $auth, $phpbb_dispatcher;
|
||||||
global $phpbb_root_path, $phpEx;
|
global $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
|
@ -540,6 +540,11 @@ function user_delete($mode, $user_id, $post_username = false)
|
||||||
|
|
||||||
$db->sql_transaction('commit');
|
$db->sql_transaction('commit');
|
||||||
|
|
||||||
|
$vars = array('mode', 'user_id', 'post_username');
|
||||||
|
$event = new phpbb_event_data(compact($vars));
|
||||||
|
$phpbb_dispatcher->dispatch('core.user_delete', $event);
|
||||||
|
extract($event->get_data_filtered($vars));
|
||||||
|
|
||||||
// Reset newest user info if appropriate
|
// Reset newest user info if appropriate
|
||||||
if ($config['newest_user_id'] == $user_id)
|
if ($config['newest_user_id'] == $user_id)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue