From 38d7ad40a3d36e6b4e727a784aae2a7154d0fc0c Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Mon, 8 Oct 2018 15:37:54 +0200 Subject: [ticket/15832] Add core.acp_users_avatar_sql event PHPBB3-15832 --- phpBB/includes/acp/acp_users.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'phpBB/includes/acp') diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 60afccdc22..2a9279d91c 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1883,6 +1883,17 @@ class acp_users 'user_avatar_height' => $result['avatar_height'], ); + /** + * Modify users preferences data before assigning it to the template + * + * @event core.acp_users_avatar_sql + * @var array user_row Array with user data + * @var array result Array with user avatar data to be updated in the DB + * @since 3.2.4-RC1 + */ + $vars = array('user_row', 'result'); + extract($phpbb_dispatcher->trigger_event('core.acp_users_avatar_sql', compact($vars))); + $sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $result) . ' WHERE user_id = ' . (int) $user_id; -- cgit v1.2.1