1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-23 09:00:48 +01:00

[ticket/15832] Add core.acp_users_avatar_sql event

PHPBB3-15832
This commit is contained in:
Jakub Senko 2018-10-08 15:37:54 +02:00
parent 001f32da95
commit 38d7ad40a3
No known key found for this signature in database
GPG Key ID: 6A7C328CD66EC21E

View File

@ -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;